[pypy-commit] pypy set-strategies: fixed eq__Set_settypedef

l.diekmann noreply at buildbot.pypy.org
Thu Nov 10 13:49:29 CET 2011


Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: set-strategies
Changeset: r49147:60ddcb62aeca
Date: 2011-05-10 13:41 +0200
http://bitbucket.org/pypy/pypy/changeset/60ddcb62aeca/

Log:	fixed eq__Set_settypedef

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
@@ -626,9 +626,11 @@
 eq__Frozenset_Set = eq__Set_Set
 
 def eq__Set_settypedef(space, w_left, w_other):
-    #XXX dont know how to test this
-    rd = make_setdata_from_w_iterable(space, w_other)
-    return space.wrap(_is_eq(w_left.setdata, rd))
+    # tested in test_buildinshortcut.py
+    #XXX do not make new setobject here
+    setdata = make_setdata_from_w_iterable(space, w_other)
+    w_other_as_set = w_left._newobj(space, setdata)
+    return space.wrap(w_left.equals(w_other))
 
 eq__Set_frozensettypedef = eq__Set_settypedef
 eq__Frozenset_settypedef = eq__Set_settypedef


More information about the pypy-commit mailing list