You are correct that integer infinity is possible, and that not one of them has been added to the Python standard. This is probably due to the fact that math.inf supplants it in almost all cases (as Martain stated in his comment).
In the meantime, I have added an extension of extended integers to PyPI:
In [0]: from numbers import Integral, Real In [0]: from extended_int import int_inf, ExtendedIntegral, Infinite In [0]: i = int_inf In [4]: float(i) Out[4]: inf In [5]: print(i) inf In [6]: i ** i Out[6]: inf In [7]: i Out[7]: inf In [9]: isinstance(i, Real) Out[9]: True In [10]: isinstance(i, Integral) Out[10]: False In [11]: isinstance(i, Infinite) Out[11]: True In [12]: isinstance(i, ExtendedIntegral) Out[12]: True In [13]: isinstance(2, ExtendedIntegral) Out[13]: True In [14]: isinstance(2, Infinite) Out[14]: False
Neil G Mar 01 '16 at 2:05 2016-03-01 14:05
source share