← 输入框|bugs.python.org|刷新

➜

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.

作者 rhettinger
收信人 Nathaniel Manista, docs@python, rhettinger, tfish2
日期 2022-03-25.17:52:34
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1648230755.09.0.546195749712.issue47121@roundup.psfhosted.org>
In-reply-to
内容
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".
历史
日期 用户 动作 参数
2022-03-25 17:52:35rhettinger修改recipients: + rhettinger, docs@python, Nathaniel Manista, tfish2
2022-03-25 17:52:35rhettinger修改messageid: <1648230755.09.0.546195749712.issue47121@roundup.psfhosted.org>
2022-03-25 17:52:35rhettinger链接issue47121 messages
2022-03-25 17:52:34rhettinger创建