mirror of
https://github.com/python/cpython.git
synced 2024-12-19 14:53:39 +08:00
Port 2.7 fix for sporadic failure in test_weakset.
This commit is contained in:
commit
a14bd00542
@ -114,11 +114,8 @@ class WeakSet:
|
||||
def update(self, other):
|
||||
if self._pending_removals:
|
||||
self._commit_removals()
|
||||
if isinstance(other, self.__class__):
|
||||
self.data.update(other.data)
|
||||
else:
|
||||
for element in other:
|
||||
self.add(element)
|
||||
for element in other:
|
||||
self.add(element)
|
||||
|
||||
def __ior__(self, other):
|
||||
self.update(other)
|
||||
|
Loading…
Reference in New Issue
Block a user