object

class object Return a new featureless object. object is a base for all classes. It has the methods that are common to all instances of Python classes. This function does not accept any arguments. Note object does not have a __dict__, so you can’t assign arbitrary attributes to an instance of the object class.

numbers.Real

class numbers.Real To Complex, Real adds the operations that work on real numbers. In short, those are: a conversion to float, math.trunc(), round(), math.floor(), math.ceil(), divmod(), //, %, <, <=, >, and >=. Real also provides defaults for complex(), real, imag, and conjugate().

numbers.Rational.numerator

numerator Abstract.

numbers.Rational.denominator

denominator Abstract.

numbers.Rational

class numbers.Rational Subtypes Real and adds numerator and denominator properties, which should be in lowest terms. With these, it provides a default for float(). numerator Abstract. denominator Abstract.

numbers.Number

class numbers.Number The root of the numeric hierarchy. If you just want to check if an argument x is a number, without caring what kind, use isinstance(x, Number).

numbers.Integral

class numbers.Integral Subtypes Rational and adds a conversion to int. Provides defaults for float(), numerator, and denominator. Adds abstract methods for ** and bit-string operations: <<, >>, &, ^, |, ~.

numbers.Complex.real

real Abstract. Retrieves the real component of this number.

numbers.Complex.imag

imag Abstract. Retrieves the imaginary component of this number.

numbers.Complex.conjugate()

abstractmethod conjugate() Abstract. Returns the complex conjugate. For example, (1+3j).conjugate() == (1-3j).