Infinite integer in Python
问题 Python 3 has float('inf') and Decimal('Infinity') but no int('inf') . So, why a number representing the infinite set of integers is missing in the language? Is int('inf') unreasonable? 回答1: Taken from here: https://www.gnu.org/software/libc/manual/html_node/Infinity-and-NaN.html IEEE 754 floating point numbers can represent positive or negative infinity, and NaN (not a number) That is, the representation of float and Decimal can store these special values. However, there is nothing within the