Commits

Michael Foord committed f3830c6

(mfoord) making unicode type clearer for the annotator

  • Participants
  • Parent commits 90a5577
  • Branches bytearray

Comments (0)

Files changed (1)

pypy/objspace/std/unicodeobject.py

     if not space.isinstance_w(w_old, space.w_unicode):
         old = unicode(space.bufferstr_w(w_old))
     else:
-        old = w_old._value
+        old = space.unicode_w(w_old)
     if not space.isinstance_w(w_new, space.w_unicode):
         new = unicode(space.bufferstr_w(w_new))
     else:
-        new = w_new._value
+        new = space.unicode_w(w_new)
     return _unicode_replace(space, w_self, old, new, w_maxsplit)
 
 def _unicode_replace(space, w_self, old, new, w_maxsplit):