>>> import bitmath | |
>>> parsed = bitmath.parse_string('100k') | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/home/tbielawa/lib/python/bitmath/__init__.py", line 1396, in parse_string | |
raise ValueError("The unit %s is not a valid bitmath unit" % unit) | |
ValueError: The unit k is not a valid bitmath unit | |
>>> parsed = bitmath.parse_string_unsafe('100k') | |
>>> parsed == bitmath.kB(100) | |
True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment