The numbers
module contains the abstract metaclasses for the numerical types:
subclasses | numbers.Number | numbers.Integral | numbers.Rational | numbers.Real | numbers.Complex |
---|---|---|---|---|---|
bool | ✓ | ✓ | ✓ | ✓ | ✓ |
int | ✓ | ✓ | ✓ | ✓ | ✓ |
fractions.Fraction | ✓ | ― | ✓ | ✓ | ✓ |
float | ✓ | ― | ― | ✓ | ✓ |
complex | ✓ | ― | ― | ― | ✓ |
decimal.Decimal | ✓ | ― | ― | ― | ― |