From: Raymond Hettinger Date: Thu, 5 May 2011 18:35:50 +0000 (-0700) Subject: Avoid codec spelling issues by just using the utf-8 default. X-Git-Tag: v3.2.1b1~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f90ba8a9a20f61c2a46d0881e39e558e39f968e8;p=thirdparty%2FPython%2Fcpython.git Avoid codec spelling issues by just using the utf-8 default. --- diff --git a/Lib/random.py b/Lib/random.py index 6bdd439b3224..33d3634451ba 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')