diff options
author | Marc-André Lemburg <mal@egenix.com> | 2011-02-25 15:42:01 +0000 |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2011-02-25 15:42:01 +0000 |
commit | 096c745e602a5c3f2fcf697ab6323422ef4a2f68 (patch) | |
tree | 8015a04bfa9d0b7774e7fbf5377bb7082cd92e3c /Lib/random.py | |
parent | db738bcdbbd679cacf8be85f9f0f08760ce9e1e5 (diff) | |
download | cpython-096c745e602a5c3f2fcf697ab6323422ef4a2f68.tar.gz |
Normalize the encoding names for Latin-1 and UTF-8 to
'latin-1' and 'utf-8'.
These are optimized in the Python Unicode implementation
to result in more direct processing, bypassing the codec
registry.
Also see issue11303.
Diffstat (limited to 'Lib/random.py')
-rw-r--r-- | Lib/random.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/random.py b/Lib/random.py index cb49d5634f..f29803e8fb 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("utf-8") a += _sha512(a).digest() a = int.from_bytes(a, 'big') |