summaryrefslogtreecommitdiffstats
path: root/Lib/random.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-05-05 18:38:06 (GMT)
committerRaymond Hettinger <python@rcn.com>2011-05-05 18:38:06 (GMT)
commit7c5dc912babeb6b0dc0f4d7131886f7f937e6f16 (patch)
tree9a96bf95985dccde4d42a6d2cd42c649b435b7f2 /Lib/random.py
parentb596dc7c86a83c799973ff93e44419a261ea8891 (diff)
parentf90ba8a9a20f61c2a46d0881e39e558e39f968e8 (diff)
downloadcpython-7c5dc912babeb6b0dc0f4d7131886f7f937e6f16.zip
cpython-7c5dc912babeb6b0dc0f4d7131886f7f937e6f16.tar.gz
cpython-7c5dc912babeb6b0dc0f4d7131886f7f937e6f16.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 0794f94..49b7c93 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("utf-8")
+ a = a.encode()
a += _sha512(a).digest()
a = int.from_bytes(a, 'big')