Author: Armin Rigo <[email protected]>
Branch:
Changeset: r92430:7fe0041fccaa
Date: 2017-09-21 09:40 +0200
http://bitbucket.org/pypy/pypy/changeset/7fe0041fccaa/
Log: Fix in the PyPy-specific code: assign a number with ord(char), to
allow 'tostr' to be a unicode string too.
diff --git a/lib-python/2.7/string.py b/lib-python/2.7/string.py
--- a/lib-python/2.7/string.py
+++ b/lib-python/2.7/string.py
@@ -75,7 +75,7 @@
for i in range(256):
buf[i] = i
for i in range(n):
- buf[ord(fromstr[i])] = tostr[i]
+ buf[ord(fromstr[i])] = ord(tostr[i])
return str(buf)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit