[pypy-commit] pypy stdlib-2.7.8: Can now use == and != to compare set objects to collections.Set instances
alex_gaynor
noreply at buildbot.pypy.org
Sat Aug 23 21:02:13 CEST 2014
Author: Alex Gaynor <alex.gaynor at gmail.com>
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)
More information about the pypy-commit
mailing list