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