Right now the transcrypted float() uses JS parseFloat, but parseFoat allows for non-numeric values in the string it is partsing. It jsut stops parsing when it hits a non-numeric value instead of throwing NaN. CPython will instead raise a ValueError.
parseFloat("123.pdf")
123
float("123.pdf")
Traceback (most recent call last):
File "/opt/pycharm/plugins/python-ce/helpers/pydev/pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
ValueError: could not convert string to float: '123.pdf'
Maybe use Number instead of parseFloat?
Right now the transcrypted float() uses JS parseFloat, but parseFoat allows for non-numeric values in the string it is partsing. It jsut stops parsing when it hits a non-numeric value instead of throwing NaN. CPython will instead raise a ValueError.
Maybe use Number instead of parseFloat?