Issue #1717: Remove cmp. Stage 1: remove all uses of cmp and __cmp__ from

the standard library and tests.
This commit is contained in:
Mark Dickinson 2009-01-27 18:17:45 +00:00
parent 191e850053
commit a56c467ac3
32 changed files with 210 additions and 216 deletions

View file

@ -31,7 +31,7 @@ def _strcoll(a,b):
""" strcoll(string,string) -> int.
Compares two strings according to the locale.
"""
return cmp(a,b)
return (a > b) - (a < b)
def _strxfrm(s):
""" strxfrm(string) -> string.