Author: Armin Rigo <[email protected]>
Branch: space-newtext
Changeset: r90142:19dc3e9fb603
Date: 2017-02-15 09:36 +0100
http://bitbucket.org/pypy/pypy/changeset/19dc3e9fb603/

Log:    two places where newtext is better than newbytes

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
@@ -153,7 +153,7 @@
             else:
                 return self.newint(x)
         if isinstance(x, str):
-            return self.newbytes(x)
+            return self.newtext(x)
         if isinstance(x, unicode):
             return self.newunicode(x)
         if isinstance(x, float):
@@ -547,7 +547,7 @@
         if isinstance(w_slice, W_SliceObject):
             a, b, c = w_slice.indices3(self, self.int_w(w_length))
             return (a, b, c)
-        w_indices = self.getattr(w_slice, self.newbytes('indices'))
+        w_indices = self.getattr(w_slice, self.newtext('indices'))
         w_tup = self.call_function(w_indices, w_length)
         l_w = self.unpackiterable(w_tup)
         if not len(l_w) == 3:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to