[issue39788] Exponential notation should return an int if it can
Marco Sulla
report at bugs.python.org
Sat Feb 29 12:50:09 EST 2020
Marco Sulla <launchpad.net at marco.sulla.e4ward.com> added the comment:
Sorry, but I can't figure out what code can break this change. Integers are implicitly converted to floats in operations with floats. How can this change break old code?
> if you are worried about the performance
No, I'm worried about the expectations of coders.
Personally, I expected that 1E2 returned a integer. And this is not true.
If I wanted a float, I'd wrote 1.0E2 . The fact the exponential notation returns always a float is really misleading, IMHO.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39788>
_______________________________________
More information about the Python-bugs-list
mailing list