All numbers inherit from this class. If you just want to check if an argument x is a number, without caring what kind, use isinstance(x, Number).
| 35 | __all__ = ["Number", "Complex", "Real", "Rational", "Integral"] |
| 36 | |
| 37 | class Number(metaclass=ABCMeta): |
| 38 | """All numbers inherit from this class. |
| 39 | |
| 40 | If you just want to check if an argument x is a number, without |
| 41 | caring what kind, use isinstance(x, Number). |
| 42 | """ |
| 43 | __slots__ = () |
| 44 | |
| 45 | # Concrete numeric types must provide their own hash implementation |
| 46 | __hash__ = None |
| 47 | |
| 48 | |
| 49 | ## Notes on Decimal |
no outgoing calls
no test coverage detected
searching dependent graphs…