This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients christian.heimes, marco.buttu, mark.dickinson, terry.reedy
Date 2013-07-29.20:35:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'd prefer to keep the current behaviour for int / int with an out-of-range result (i.e., raise OverflowError).  As far as possible, I believe Python should raise an exception rather than return an infinity or nan whenever possible (with exceptions when one or other of the operands was an infinity or nan to begin with).  The math module does this consistently;  but (mostly for historical reasons) the core of Python doesn't have a lot of consistency w.r.t. overflow versus infinities:

Still, my own preference would be to try to move to greater use of exceptions rather than to greater use of 'inf' and 'nan' results.  So if anything, 2**1023 / 2**-3 would ideally raise OverflowError rather than return 'inf'.

Note that 1 / 0 also currently raises an exception rather than returning an infinity.

Agreed that 'long int' should be 'int'.
Date User Action Args
2013-07-29 20:35:33mark.dickinsonsetrecipients: + mark.dickinson, terry.reedy, christian.heimes, marco.buttu
2013-07-29 20:35:33mark.dickinsonsetmessageid: <>
2013-07-29 20:35:33mark.dickinsonlinkissue18570 messages
2013-07-29 20:35:33mark.dickinsoncreate