[issue39788] Exponential notation should return an int if it can
Tim Peters
report at bugs.python.org
Sat Feb 29 14:48:14 EST 2020
Tim Peters <tim at python.org> added the comment:
Ya, this change will never be made - give up gracefully :-)
1e100 and 10**100 aren't just of different types, they have different mathematical _values_ now:
>>> 1e100 == 10**100
False
>>> int(1e100)
10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104
Of course this has visible consequences, like:
>>> 1e100 % 1000
104.0
>>> int(1e100) % 1000
104
>>> 10**100 % 1000
0
----------
nosy: +tim.peters
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39788>
_______________________________________
More information about the Python-bugs-list
mailing list