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, rhettinger, tfish2
Date 2022-03-25.17:52:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648230755.09.0.546195749712.issue47121@roundup.psfhosted.org>
In-reply-to
Content
The math.isfinite() docs could be changed to something like, "coerces x to a float if possible and then returns True if x is neither an infinity nor a NaN, and False otherwise."  Or there could be a general note about which functions (most of them) coerce to float (which can fail).

With respect to typing and PEP-484, I don't see a bug or documentation issue.  Types relationships are useful for verifying which methods are available, but they don't make promises about the range of valid values.  For example math.sqrt(float) -> float promises which types are acceptable but doesn't promise that negative inputs won't raise an exception.  Likewise, "n: int=10; len(range(n))" is type correct but will raise an OverflowError for "n = 10**100".
History
Date User Action Args
2022-03-25 17:52:35rhettingersetrecipients: + rhettinger, docs@python, Nathaniel Manista, tfish2
2022-03-25 17:52:35rhettingersetmessageid: <1648230755.09.0.546195749712.issue47121@roundup.psfhosted.org>
2022-03-25 17:52:35rhettingerlinkissue47121 messages
2022-03-25 17:52:34rhettingercreate