mirror of
https://github.com/Andre0512/pyhOn.git
synced 2024-01-19 02:50:44 +00:00
Fix float convertion
This commit is contained in:
parent
7c49589944
commit
79c9678492
|
@ -2,7 +2,10 @@ import re
|
|||
|
||||
|
||||
def str_to_float(string):
|
||||
return float(string.replace(",", "."))
|
||||
try:
|
||||
return int(string)
|
||||
except ValueError:
|
||||
return float(str(string.replace(",", ".")))
|
||||
|
||||
|
||||
class HonParameter:
|
||||
|
|
Loading…
Reference in a new issue