Python classes that provides support for extended integers (the set of integers, and infinity).
Project description
Example
In [1]: from numbers import Real, Integral
In [2]: from extended_int import ExtendedIntegral, int_inf
In [3]: float(int_inf)
Out[3]: inf
In [4]: print(int_inf)
inf
In [5]: int(int_inf)
---------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
In [6]: isinstance(int_inf, Real)
Out[6]: True
In [7]: isinstance(int_inf, Integral)
Out[7]: False
In [8]: isinstance(2.5, ExtendedIntegral)
Out[8]: False
In [9]: isinstance(int_inf, ExtendedIntegral)
Out[9]: True
In [10]: isinstance(2, ExtendedIntegral)
Out[10]: True
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
extended_int-0.5.tar.gz
(2.6 kB
view hashes)
Built Distributions
extended_int-0.5-py3.7.egg
(6.4 kB
view hashes)
Close
Hashes for extended_int-0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4d2c383b88962b2b9ccecaa56472e56a5bef963ef2034d2eaab5bb936d0cb93 |
|
MD5 | 5f73d99c252eb21eaf4abd0a9592f3d2 |
|
BLAKE2b-256 | ef18fed7db61c72d9729de59c580e269b3c5d11941f83efb2c5bfc976ae24c4a |