diff options
Diffstat (limited to 'Lib/_weakrefset.py')
-rw-r--r-- | Lib/_weakrefset.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/_weakrefset.py b/Lib/_weakrefset.py index 0046133..addc7af 100644 --- a/Lib/_weakrefset.py +++ b/Lib/_weakrefset.py @@ -118,6 +118,8 @@ class WeakSet: return self.data >= set(ref(item) for item in other) def __eq__(self, other): + if not isinstance(other, self.__class__): + return NotImplemented return self.data == set(ref(item) for item in other) def symmetric_difference(self, other): |