You've already forked pyhOn
mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-12-08 21:51:42 +02:00
Fix float convertion
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user