[issue18570] OverflowError in division: wrong message

Terry J. Reedy report at bugs.python.org
Sat Jul 27 22:30:29 CEST 2013


Terry J. Reedy added the comment:

Yes, 'long int' should just be 'int' in 3.x.

However, int/int (integer division) is *not* the same thing as int/float. In the latter case, the int is converted to float first and if that conversion fails, there is no result.

Now that int/int is always converted to float, it seems sensible that out of float range results be +-inf. But there may be an issue with back compatibility. I know there has been discussion on overflow vs. inf in various contexts.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18570>
_______________________________________


More information about the Python-bugs-list mailing list