summaryrefslogtreecommitdiff
path: root/Lib/_weakrefset.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_weakrefset.py')
-rw-r--r--Lib/_weakrefset.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/_weakrefset.py b/Lib/_weakrefset.py
index f34aa864bc..c2717e7228 100644
--- a/Lib/_weakrefset.py
+++ b/Lib/_weakrefset.py
@@ -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)