Author: Manuel Jacob
Branch: remove-list-smm-2
Changeset: r64274:d71699519e23
Date: 2013-05-18 11:25 +0200
http://bitbucket.org/pypy/pypy/changeset/d71699519e23/
Log: list.__add__ works only with lists as right operator.
diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -426,6 +426,8 @@
return space.w_False
def descr_add(self, space, w_list2):
+ if not isinstance(w_list2, W_ListObject):
+ return space.w_NotImplemented
w_clone = self.clone()
w_clone.extend(w_list2)
return w_clone
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit