DiffSK / configobj

Python 3+ compatible port of the configobj library
https://configobj.readthedocs.org
Other
321 stars 76 forks source link

as_int() not work for scientific notation #154

Closed CharlesMei closed 1 year ago

CharlesMei commented 7 years ago

if using scientific notation, it will raise error "invalid literal for int() with base 10: '1e6'". What should i do if i want to use scientific notation?

jhermann commented 7 years ago

Basically, change Python, or use double. "1e6" is not an int literal, which is what the error says.

CharlesMei commented 7 years ago

@jhermann thank you! int(float(1e6)) works