簡單的數學運算子
數值型別及其元類
numbers
模組包含數值型別的抽象元類:
子類 | numbers.Number | numbers.Integral | numbers.Rational | numbers.Real | numbers.Complex |
---|---|---|---|---|---|
布林 | ✓ | ✓ | ✓ | ✓ | ✓ |
INT | ✓ | ✓ | ✓ | ✓ | ✓ |
fractions.Fraction | ✓ | - | ✓ | ✓ | ✓ |
浮動 | ✓ | - | - | ✓ | ✓ |
複雜 | ✓ | - | - | - | ✓ |
decimal.Decimal | ✓ | - | - | - | - |