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 steven.daprano
Recipients steven.daprano
Date 2016-09-06.17:04:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473181473.32.0.514007439316.issue27975@psf.upfronthosting.co.za>
In-reply-to
Content
Currently, math.isnan(n) and math.isinf(n) for n an int may raise OverflowError if n is too big to convert to a float, e.g.:

py> math.isnan(10**10000)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: int too large to convert to float


But this conversion is unnecessary. int does not support either INF or NAN, so there is no need to convert the value to float first. If the argument is an int, the result must be False.

The same applies to Fraction.
History
Date User Action Args
2016-09-06 17:04:33steven.dapranosetrecipients: + steven.daprano
2016-09-06 17:04:33steven.dapranosetmessageid: <1473181473.32.0.514007439316.issue27975@psf.upfronthosting.co.za>
2016-09-06 17:04:33steven.dapranolinkissue27975 messages
2016-09-06 17:04:33steven.dapranocreate