MCPcopy Index your code
hub / github.com/RustPython/RustPython / Number

Class Number

Lib/numbers.py:37–46  ·  view source on GitHub ↗

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).

Source from the content-addressed store, hash-verified

35__all__ = ["Number", "Complex", "Real", "Rational", "Integral"]
36
37class 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

Callers 4

parseMethod · 0.50
parse_format_typeFunction · 0.50
test_parse_keyFunction · 0.50
test_parse_flagsFunction · 0.50

Calls

no outgoing calls

Tested by 2

test_parse_keyFunction · 0.40
test_parse_flagsFunction · 0.40