[Python-checkins] cpython (3.2): Port 2.7 fix for sporadic failure in test_weakset.

antoine.pitrou python-checkins at python.org
Sun Mar 4 21:04:08 CET 2012


http://hg.python.org/cpython/rev/5a2bc0d574f6
changeset:   75398:5a2bc0d574f6
branch:      3.2
parent:      75374:4966907d3661
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sun Mar 04 20:20:34 2012 +0100
summary:
  Port 2.7 fix for 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
@@ -114,11 +114,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