Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r93665:13b9de153e3c
Date: 2018-01-14 16:40 +0100
http://bitbucket.org/pypy/pypy/changeset/13b9de153e3c/
Log: Issue #2732
Fix, maybe
diff --git a/lib_pypy/pyrepl/reader.py b/lib_pypy/pyrepl/reader.py
--- a/lib_pypy/pyrepl/reader.py
+++ b/lib_pypy/pyrepl/reader.py
@@ -50,13 +50,14 @@
def _my_unctrl(c, u=_make_unctrl_map()):
+ # takes an integer, returns a unicode
if c in u:
return u[c]
else:
if unicodedata.category(c).startswith('C'):
- return br'\u%04x' % ord(c)
+ return r'\u%04x' % ord(c)
else:
- return c
+ return unichr(c)
if 'a'[0] == b'a':
# When running tests with python2, bytes characters are bytes.
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit