From f90ba8a9a20f61c2a46d0881e39e558e39f968e8 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Thu, 5 May 2011 11:35:50 -0700 Subject: [PATCH] Avoid codec spelling issues by just using the utf-8 default. --- Lib/random.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/random.py b/Lib/random.py index 6bdd439b322..33d3634451b 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -114,7 +114,7 @@ def seed(self, a=None, version=2): 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')