This commit is contained in:
aozhiwei 2020-01-10 19:16:18 +08:00
parent b4ea03b447
commit 4af43d5649

View File

@ -14,3 +14,9 @@ def crc32(data):
hash_code = binascii.crc32(data)
assert hash_code >= 0
return hash_code
def safeDiv(a, b):
if b == 0:
return 0
else:
return a / b