[Python-checkins] cpython (2.7): Fix sporadic failure in test_weakset
antoine.pitrou
python-checkins at python.org
Sun Mar 4 20:24:33 CET 2012
http://hg.python.org/cpython/rev/5f79d68ba087
changeset: 75395:5f79d68ba087
branch: 2.7
parent: 75392:e04e1f253ed8
user: Antoine Pitrou <solipsis at pitrou.net>
date: Sun Mar 04 20:20:34 2012 +0100
summary:
Fix sporadic failure in test_weakset
files:
Lib/_weakrefset.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/Lib/_weakrefset.py b/Lib/_weakrefset.py
--- a/Lib/_weakrefset.py
+++ b/Lib/_weakrefset.py
@@ -116,11 +116,8 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list