parse float values
This commit is contained in:
parent
6fec8076b4
commit
918b3bf10b
|
@ -22,9 +22,9 @@ def parse_value(v):
|
||||||
suffix = v[-1].upper()
|
suffix = v[-1].upper()
|
||||||
if suffix in SUFFIXES:
|
if suffix in SUFFIXES:
|
||||||
exponent = 3*(SUFFIXES.find(suffix)+1)
|
exponent = 3*(SUFFIXES.find(suffix)+1)
|
||||||
return int(v[:-1])*(10**exponent)
|
return float(v[:-1])*(10**exponent)
|
||||||
else:
|
else:
|
||||||
return int(v)
|
return float(v)
|
||||||
|
|
||||||
def display_value(v):
|
def display_value(v):
|
||||||
suffix = ''
|
suffix = ''
|
||||||
|
|
Loading…
Reference in a new issue