[pypy-commit] pypy py3.6: fix TODO: no, ignoring is_ascii wasn't correct :-(
cfbolz
pypy.commits at gmail.com
Fri Feb 22 15:59:32 EST 2019
Author: Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>
Branch: py3.6
Changeset: r96138:64cbcb808e45
Date: 2019-02-22 21:56 +0100
http://bitbucket.org/pypy/pypy/changeset/64cbcb808e45/
Log: fix TODO: no, ignoring is_ascii wasn't correct :-(
diff --git a/pypy/objspace/std/objspace.py b/pypy/objspace/std/objspace.py
--- a/pypy/objspace/std/objspace.py
+++ b/pypy/objspace/std/objspace.py
@@ -329,11 +329,13 @@
return W_ListObject.newlist_bytes(self, list_s)
def newlist_text(self, list_t):
- return self.newlist_utf8([decode_utf8sp(self, s)[0] for s in list_t])
+ return self.newlist_utf8([decode_utf8sp(self, s)[0] for s in list_t], False)
- def newlist_utf8(self, list_u, is_ascii=True):
- # TODO ignoring is_ascii, is that correct?
- return W_ListObject.newlist_utf8(self, list_u)
+ def newlist_utf8(self, list_u, is_ascii):
+ if is_ascii:
+ return W_ListObject.newlist_utf8(self, list_u)
+ return ObjSpace.newlist_utf8(self, list_u, False)
+
def newlist_int(self, list_i):
return W_ListObject.newlist_int(self, list_i)
More information about the pypy-commit
mailing list