mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #1717: Remove cmp. Stage 1: remove all uses of cmp and __cmp__ from
the standard library and tests.
This commit is contained in:
parent
191e850053
commit
a56c467ac3
32 changed files with 210 additions and 216 deletions
|
@ -234,9 +234,9 @@ class GetOnly:
|
|||
|
||||
class CmpErr:
|
||||
"Dummy element that always raises an error during comparison"
|
||||
def __cmp__(self, other):
|
||||
def __eq__(self, other):
|
||||
raise ZeroDivisionError
|
||||
__eq__ = __ne__ = __lt__ = __le__ = __gt__ = __ge__ = __cmp__
|
||||
__ne__ = __lt__ = __le__ = __gt__ = __ge__ = __eq__
|
||||
|
||||
def R(seqn):
|
||||
'Regular generator'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue