Author: Manuel Jacob
Branch: refactor-str-types
Changeset: r65794:3788cc2a0262
Date: 2013-07-29 16:39 +0200
http://bitbucket.org/pypy/pypy/changeset/3788cc2a0262/
Log: Fix translation.
diff --git a/pypy/objspace/std/bytesobject.py b/pypy/objspace/std/bytesobject.py
--- a/pypy/objspace/std/bytesobject.py
+++ b/pypy/objspace/std/bytesobject.py
@@ -206,6 +206,8 @@
def descr_contains(self, space, w_sub):
if space.isinstance_w(w_sub, space.w_unicode):
+ from pypy.objspace.std.unicodeobject import W_UnicodeObject
+ assert isinstance(w_sub, W_UnicodeObject)
self_as_unicode = unicode_from_encoded_object(space, self, None,
None)
return space.newbool(self_as_unicode._value.find(w_sub._value) >=
0)
return StringMethods.descr_contains(self, space, w_sub)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit