On this page
  1. numbers.Complex
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

numbers.Complex

Up: numbers | Next: numbers.Integral
Rel: numbers.Integral, numbers.Number, numbers.Rational, numbers.Real
Ref: docs.python.org — numbers.Complex
Tags: #public #python3 #stdlib #numbers


Import

import numbers
from numbers import Complex

Signature & Overview

numbers.Complex()

Complex defines the operations that work on the builtin complex type.

Methods & Attributes

Usage

import numbers

assert isinstance(3 + 4j, numbers.Complex)
assert isinstance(5, numbers.Complex)   # Integral < Rational < Real < Complex

Gotchas

REPL Inspect

from numbers import Complex
help(Complex)

Linked from

Related notes