summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-03-20 14:49:10 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-03-20 14:49:10 (GMT)
commitd02eb8a713db8708a7981fe1ba801efaf606a359 (patch)
tree839493cc78808ff2cf818f467793f0cab89f974a
parent563c949b11100faef670df0978df3525a7c75285 (diff)
downloadcpython-d02eb8a713db8708a7981fe1ba801efaf606a359.zip
cpython-d02eb8a713db8708a7981fe1ba801efaf606a359.tar.gz
cpython-d02eb8a713db8708a7981fe1ba801efaf606a359.tar.bz2
Issue #19164: Improve exception message of uuid.UUID()
Patch by jgauthier.
-rw-r--r--Lib/uuid.py3
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('-', '')