wlav avatar wlav committed 9f6a3c1 Merge

o) merge default into branch
o) add UCB to copyright holders
o) document reflex-support addition in whatsnew

Comments (0)

Files changed (4)

     DFKI GmbH, Germany 
     Impara, Germany
     Change Maker, Sweden 
+    University of California Berkeley, USA
 The PyPy Logo as used by http://speed.pypy.org and others was created
 by Samuel Reis and is distributed on terms of Creative Commons Share Alike


 .. branch: default
 .. branch: app_main-refactor
 .. branch: win-ordinal
+.. branch: reflex-support
+Provides cppyy module (disabled by default) for access to C++ through Reflex.
+See doc/cppyy.rst for full details and functionality.
 .. "uninteresting" branches that we should just ignore for the whatsnew:


             storage = self._difference_unwrapped(w_set, w_other)
         elif not w_set.strategy.may_contain_equal_elements(w_other.strategy):
             strategy = w_set.strategy
-            storage = w_set.sstorage
+            d = self.unerase(w_set.sstorage)
+            storage = self.erase(d.copy())
             strategy = self.space.fromcache(ObjectSetStrategy)
             storage = self._difference_wrapped(w_set, w_other)
     def update(self, w_set, w_other):
         d_obj = self.unerase(w_set.sstorage)
+        # optimization only
+        if w_other.strategy is self:
+            d_other = self.unerase(w_other.sstorage)
+            d_obj.update(d_other)
+            return
         w_iterator = w_other.iter()
         while True:
             w_item = w_iterator.next_entry()


         assert set([1,2,3,'5']).difference(set([2,3,4])) == set([1,'5'])
         assert set().difference(set([1,2,3])) == set()
+    def test_difference_bug(self):
+        a = set([1,2,3])
+        b = set([])
+        c = a - b
+        c.remove(2)
+        assert c == set([1, 3])
+        assert a == set([1, 2, 3])
+        a = set([1,2,3])
+        b = set(["a", "b", "c"])
+        c = a - b
+        c.remove(2)
+        assert c == set([1, 3])
+        assert a == set([1, 2, 3])
     def test_intersection_update(self):
         s = set([1,2,3,4,7])
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.