[Python-checkins] cpython (merge 3.2 -> default): Avoid codec spelling issues by just using the utf-8 default.
raymond.hettinger
python-checkins at python.org
Thu May 5 20:38:27 CEST 2011
http://hg.python.org/cpython/rev/2bc784057226
changeset: 69858:2bc784057226
parent: 69856:b06ad8458b32
parent: 69857:1a56775c6e54
user: Raymond Hettinger <python at rcn.com>
date: Thu May 05 11:38:06 2011 -0700
summary:
Avoid codec spelling issues by just using the utf-8 default.
files:
Lib/random.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/random.py b/Lib/random.py
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -114,7 +114,7 @@
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')
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list