summaryrefslogtreecommitdiff
path: root/Lib/random.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-05-05 11:35:50 -0700
committerRaymond Hettinger <python@rcn.com>2011-05-05 11:35:50 -0700
commit7d00a405a1035c4925accb469d39c24a7f9cb850 (patch)
treea1cf092f487335834d7e49f44b55ffcf97507250 /Lib/random.py
parent7777a1ae8a383004eeea2eeb4519534e82a2e65c (diff)
downloadcpython-7d00a405a1035c4925accb469d39c24a7f9cb850.tar.gz
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 6bdd439b32..33d3634451 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')