Author: Lukas Diekmann <[email protected]>
Branch: set-strategies
Changeset: r49249:78ae9026b827
Date: 2011-10-14 16:08 +0200
http://bitbucket.org/pypy/pypy/changeset/78ae9026b827/

Log:    use the correct dict (here: r_dict for wrapped items)

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
@@ -481,13 +481,14 @@
         return True
 
     def _difference_wrapped(self, w_set, w_other):
-        d_new = self.get_empty_dict()
+        strategy = self.space.fromcache(ObjectSetStrategy)
+
+        d_new = strategy.get_empty_dict()
         for obj in self.unerase(w_set.sstorage):
             w_item = self.wrap(obj)
             if not w_other.has_key(w_item):
                 d_new[w_item] = None
 
-        strategy = self.space.fromcache(ObjectSetStrategy)
         return strategy.erase(d_new)
 
     def _difference_unwrapped(self, w_set, w_other):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to