summaryrefslogtreecommitdiffstats
path: root/Lib/random.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-05-05 18:35:50 (GMT)
committerRaymond Hettinger <python@rcn.com>2011-05-05 18:35:50 (GMT)
commitf90ba8a9a20f61c2a46d0881e39e558e39f968e8 (patch)
treec2d4f83eee90533cd61754dd73323d80ca865763 /Lib/random.py
parentc4d7864e0ead4b764732b75d52cab180151dde2e (diff)
downloadcpython-f90ba8a9a20f61c2a46d0881e39e558e39f968e8.zip
cpython-f90ba8a9a20f61c2a46d0881e39e558e39f968e8.tar.gz
cpython-f90ba8a9a20f61c2a46d0881e39e558e39f968e8.tar.bz2
Avoid codec spelling issues by just using the utf-8 default.
Diffstat (limited to 'Lib/random.py')
-rw-r--r--Lib/random.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/random.py b/Lib/random.py
index 6bdd439..33d3634 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -114,7 +114,7 @@ class Random(_random.Random):
if version == 2:
if isinstance(a, (str, bytes, bytearray)):
if isinstance(a, str):
- a = a.encode("utf8")
+ a = a.encode()
a += _sha512(a).digest()
a = int.from_bytes(a, 'big')