简单的数学运算符
数值类型及其元类
numbers
模块包含数值类型的抽象元类:
子类 | numbers.Number | numbers.Integral | numbers.Rational | numbers.Real | numbers.Complex |
---|---|---|---|---|---|
布尔 | ✓ | ✓ | ✓ | ✓ | ✓ |
INT | ✓ | ✓ | ✓ | ✓ | ✓ |
fractions.Fraction | ✓ | - | ✓ | ✓ | ✓ |
浮动 | ✓ | - | - | ✓ | ✓ |
复杂 | ✓ | - | - | - | ✓ |
decimal.Decimal | ✓ | - | - | - | - |