projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4d7864
)
Avoid codec spelling issues by just using the utf-8 default.
author
Raymond Hettinger
<python@rcn.com>
Thu, 5 May 2011 18:35:50 +0000
(11:35 -0700)
committer
Raymond Hettinger
<python@rcn.com>
Thu, 5 May 2011 18:35:50 +0000
(11:35 -0700)
Lib/random.py
patch
|
blob
|
history
diff --git
a/Lib/random.py
b/Lib/random.py
index 6bdd439b3224ac00a8ccf359b4cdd56be6715f99..33d3634451ba1d26b08506cfc38994de4de9c30c 100644
(file)
--- 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')