diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-03-20 14:49:29 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-03-20 14:49:29 (GMT) |
commit | c0e7a9c72ba327f5486bc367476e0a843c33af2b (patch) | |
tree | 5a00785cf86b7dbb1e73713db45b626dd484e1c2 /Lib | |
parent | 5d7286c05d8138563ab136fb892b95f86b0368e9 (diff) | |
parent | d02eb8a713db8708a7981fe1ba801efaf606a359 (diff) | |
download | cpython-c0e7a9c72ba327f5486bc367476e0a843c33af2b.zip cpython-c0e7a9c72ba327f5486bc367476e0a843c33af2b.tar.gz cpython-c0e7a9c72ba327f5486bc367476e0a843c33af2b.tar.bz2 |
Issue #19164: Improve exception message of uuid.UUID()
Patch by jgauthier.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/uuid.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/uuid.py b/Lib/uuid.py index 5b24e2c..e96e7e0 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py @@ -131,7 +131,8 @@ class UUID(object): """ if [hex, bytes, bytes_le, fields, int].count(None) != 4: - raise TypeError('need one of hex, bytes, bytes_le, fields, or int') + raise TypeError('one of the hex, bytes, bytes_le, fields, ' + 'or int arguments must be given') if hex is not None: hex = hex.replace('urn:', '').replace('uuid:', '') hex = hex.strip('{}').replace('-', '') |