Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d02eb8a

Browse files
committed
Issue #19164: Improve exception message of uuid.UUID()
Patch by jgauthier.
1 parent 563c949 commit d02eb8a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/uuid.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ def __init__(self, hex=None, bytes=None, bytes_le=None, fields=None,
131131
"""
132132

133133
if [hex, bytes, bytes_le, fields, int].count(None) != 4:
134-
raise TypeError('need one of hex, bytes, bytes_le, fields, or int')
134+
raise TypeError('one of the hex, bytes, bytes_le, fields, '
135+
'or int arguments must be given')
135136
if hex is not None:
136137
hex = hex.replace('urn:', '').replace('uuid:', '')
137138
hex = hex.strip('{}').replace('-', '')

0 commit comments

Comments
 (0)