Author: Carl Friedrich Bolz-Tereick <cfb...@gmx.de> Branch: Changeset: r98686:57362e78ee31 Date: 2020-02-08 13:31 +0100 http://bitbucket.org/pypy/pypy/changeset/57362e78ee31/
Log: fix translation (why does the same code work on py3.6?) diff --git a/pypy/objspace/std/unicodeobject.py b/pypy/objspace/std/unicodeobject.py --- a/pypy/objspace/std/unicodeobject.py +++ b/pypy/objspace/std/unicodeobject.py @@ -131,7 +131,7 @@ def listview_ascii(self): if self.is_ascii(): - return list(self._utf8) + return _create_list_from_unicode(self._utf8) return None def ord(self, space): @@ -1808,6 +1808,10 @@ ) W_UnicodeObject.typedef.flag_sequence_bug_compat = True +def _create_list_from_unicode(value): + # need this helper function to allow the jit to look inside and inline + # listview_ascii + return [s for s in value] W_UnicodeObject.EMPTY = W_UnicodeObject('', 0) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit