mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #21408: The default __ne__() now returns NotImplemented if __eq__()
returned NotImplemented. Removed incorrect implementations of __ne__().
This commit is contained in:
parent
155ceaa454
commit
f4b7a02e93
11 changed files with 77 additions and 47 deletions
|
@ -224,9 +224,6 @@ class Set(Sized, Iterable, Container):
|
|||
return NotImplemented
|
||||
return len(self) == len(other) and self.__le__(other)
|
||||
|
||||
def __ne__(self, other):
|
||||
return not (self == other)
|
||||
|
||||
@classmethod
|
||||
def _from_iterable(cls, it):
|
||||
'''Construct an instance of the class from any iterable input.
|
||||
|
@ -451,9 +448,6 @@ class Mapping(Sized, Iterable, Container):
|
|||
return NotImplemented
|
||||
return dict(self.items()) == dict(other.items())
|
||||
|
||||
def __ne__(self, other):
|
||||
return not (self == other)
|
||||
|
||||
Mapping.register(mappingproxy)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue