[Python-checkins] cpython (3.5): Issue #19164: Improve exception message of uuid.UUID()
berker.peksag
python-checkins at python.org
Sun Mar 20 10:58:29 EDT 2016
https://hg.python.org/cpython/rev/f736aea929c2
changeset: 100613:f736aea929c2
branch: 3.5
parent: 100610:8d41ce2cde18
user: Berker Peksag <berker.peksag at gmail.com>
date: Sun Mar 20 16:49:10 2016 +0200
summary:
Issue #19164: Improve exception message of uuid.UUID()
Patch by jgauthier.
files:
Lib/uuid.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Lib/uuid.py b/Lib/uuid.py
--- a/Lib/uuid.py
+++ b/Lib/uuid.py
@@ -131,7 +131,8 @@
"""
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('-', '')
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list