We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a90ef0 commit de89d4bCopy full SHA for de89d4b
1 file changed
Lib/_weakrefset.py
@@ -114,11 +114,8 @@ def discard(self, item):
114
def update(self, other):
115
if self._pending_removals:
116
self._commit_removals()
117
- if isinstance(other, self.__class__):
118
- self.data.update(other.data)
119
- else:
120
- for element in other:
121
- self.add(element)
+ for element in other:
+ self.add(element)
122
123
def __ior__(self, other):
124
self.update(other)
0 commit comments