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 rhettinger
Recipients Nathaniel Manista, docs@python, mark.dickinson, rhettinger, serhiy.storchaka, steven.daprano, tfish2, tim.peters
Date 2022-04-06.03:58:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> isfinite() should return True for all ints, without needing
> to coerce them to float

Whoa there.  You're venturing into changing what those math functions were all about and the core approach to how they operate.

A zigzag to this new direction would need discussion with all the math folks.  Many tools in the math module are thin wrapper around libmath and we never intended to be universal handlers of all numeric types.  We have a lot of functions that start by coercing their input to a float.

My two cents is that this would open an endless can of worms and make everyone pay a time and complexity cost for a feature that almost no one needs.  AFAICT is more of a purity issue than an actual practical need that would warrant separate code paths (for example, we recently closed an issue where someone wanted math.log() to have a separate code path for Fraction inputs where it return log(f.numerator) - log(f.denominator) with the goal of handling fractional values smaller than float_min).
Date User Action Args
2022-04-06 03:58:49rhettingersetrecipients: + rhettinger, tim.peters, mark.dickinson, steven.daprano, docs@python, serhiy.storchaka, Nathaniel Manista, tfish2
2022-04-06 03:58:49rhettingersetmessageid: <>
2022-04-06 03:58:49rhettingerlinkissue47121 messages
2022-04-06 03:58:49rhettingercreate