8000 Issue #19164: Improve exception message of uuid.UUID() · python/cpython@5f5cd65 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5f5cd65

Browse files
committed
Issue #19164: Improve exception message of uuid.UUID()
Patch by jgauthier.
2 parents 818101e + 10d27be commit 5f5cd65

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)
0