Author: Alex Gaynor <[email protected]>
Branch: stdlib-2.7.8
Changeset: r73013:f3440715c780
Date: 2014-08-23 12:01 -0700
http://bitbucket.org/pypy/pypy/changeset/f3440715c780/
Log: Can now use == and != to compare set objects to collections.Set
instances
diff --git a/pypy/objspace/std/setobject.py b/pypy/objspace/std/setobject.py
--- a/pypy/objspace/std/setobject.py
+++ b/pypy/objspace/std/setobject.py
@@ -178,7 +178,7 @@
return space.wrap(self.equals(w_other))
if not space.isinstance_w(w_other, space.w_set):
- return space.w_False
+ return space.w_NotImplemented
# tested in test_builtinshortcut.py
# XXX do not make new setobject here
@@ -190,7 +190,7 @@
return space.wrap(not self.equals(w_other))
if not space.isinstance_w(w_other, space.w_set):
- return space.w_True
+ return space.w_NotImplemented
# XXX this is not tested
w_other_as_set = self._newobj(space, w_other)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit