summaryrefslogtreecommitdiffstats
path: root/Lib/uuid.py
diff options
context:
space:
mode:
authorPhilip Jenvey <pjenvey@underboss.org>2013-08-30 01:33:50 (GMT)
committerPhilip Jenvey <pjenvey@underboss.org>2013-08-30 01:33:50 (GMT)
commit1221f6b60351e46ed25a7da3ebc09d80f666cc5e (patch)
treeb3362b05d8ffb54abcf0109c1e0d6b26fe04e6ff /Lib/uuid.py
parentda0bea213dd3c0cdf7a31936963c30203384dcc4 (diff)
downloadcpython-1221f6b60351e46ed25a7da3ebc09d80f666cc5e.zip
cpython-1221f6b60351e46ed25a7da3ebc09d80f666cc5e.tar.gz
cpython-1221f6b60351e46ed25a7da3ebc09d80f666cc5e.tar.bz2
utilize int.from_bytes
Diffstat (limited to 'Lib/uuid.py')
-rw-r--r--Lib/uuid.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/uuid.py b/Lib/uuid.py
index 0cdcd38..484a231 100644
--- a/Lib/uuid.py
+++ b/Lib/uuid.py
@@ -147,7 +147,7 @@ class UUID(object):
if len(bytes) != 16:
raise ValueError('bytes is not a 16-char string')
assert isinstance(bytes, bytes_), repr(bytes)
- int = int_(('%02x'*16) % tuple(bytes), 16)
+ int = int_.from_bytes(bytes, byteorder='big')
if fields is not None:
if len(fields) != 6:
raise ValueError('fields is not a 6-tuple')