Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r53804:8568c4bf99d7
Date: 2012-03-19 16:59 +0100
http://bitbucket.org/pypy/pypy/changeset/8568c4bf99d7/

Log:    I *think* that we have to kill this implementation of the
        multimethod: in py3k we only accept strings as arguments for replace

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
@@ -711,18 +711,6 @@
     return _unicode_replace(space, w_self, w_old._value, w_new._value,
                             w_maxsplit)
 
-def unicode_replace__Unicode_ANY_ANY_ANY(space, w_self, w_old, w_new,
-                                         w_maxsplit):
-    if not space.isinstance_w(w_old, space.w_unicode):
-        old = unicode(space.bufferstr_w(w_old))
-    else:
-        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 = 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):
     if len(old):
         parts = _split_with(w_self._value, old, space.int_w(w_maxsplit))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to