mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +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
|
|
@ -194,10 +194,6 @@ class Rat(object):
|
|||
return float(self) == other
|
||||
return NotImplemented
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Compare two Rats for inequality."""
|
||||
return not self == other
|
||||
|
||||
class RatTestCase(unittest.TestCase):
|
||||
"""Unit tests for Rat class and its support utilities."""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue