mirror of
https://github.com/python/cpython.git
synced 2025-08-26 19:55:24 +00:00
Avoid codec spelling issues by just using the utf-8 default.
This commit is contained in:
parent
c4d7864e0e
commit
f90ba8a9a2
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ class Random(_random.Random):
|
||||||
if version == 2:
|
if version == 2:
|
||||||
if isinstance(a, (str, bytes, bytearray)):
|
if isinstance(a, (str, bytes, bytearray)):
|
||||||
if isinstance(a, str):
|
if isinstance(a, str):
|
||||||
a = a.encode("utf8")
|
a = a.encode()
|
||||||
a += _sha512(a).digest()
|
a += _sha512(a).digest()
|
||||||
a = int.from_bytes(a, 'big')
|
a = int.from_bytes(a, 'big')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue