Commit 79cb7077 authored by Wim Lavrijsen's avatar Wim Lavrijsen

o) merge default into branch

o) add UCB to copyright holders
o) document reflex-support addition in whatsnew
parents 5c787710 f8d7054a
......@@ -216,6 +216,7 @@ copyrighted by one or more of the following people and organizations:
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
......
......@@ -8,6 +8,9 @@ What's new in PyPy xxx
.. 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:
......
......@@ -491,7 +491,8 @@ class AbstractUnwrappedSetStrategy(object):
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())
else:
strategy = self.space.fromcache(ObjectSetStrategy)
storage = self._difference_wrapped(w_set, w_other)
......@@ -776,6 +777,13 @@ class ObjectSetStrategy(AbstractUnwrappedSetStrategy, SetStrategy):
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()
......
......@@ -642,6 +642,21 @@ class AppTestAppSetTest:
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])
s.intersection_update([0,1,2,3,4,5,6])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment