Implement cmp() in util.py
This commit is contained in:
parent
9de6ac0d56
commit
d431f36989
1 changed files with 8 additions and 0 deletions
|
@ -29,3 +29,11 @@ def each_chunk(fh: io.TextIOBase, sep: str, strip=None):
|
||||||
|
|
||||||
if ret != '':
|
if ret != '':
|
||||||
yield ret
|
yield ret
|
||||||
|
|
||||||
|
def cmp(a, b):
|
||||||
|
if a == b:
|
||||||
|
return 0
|
||||||
|
elif a > b:
|
||||||
|
return -1
|
||||||
|
elif a < b:
|
||||||
|
return 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue