Implement cmp() in util.py

This commit is contained in:
XANTRONIX 2025-03-07 18:41:14 -05:00
parent 9de6ac0d56
commit d431f36989

View file

@ -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