7.2.5.2 Complex Numbers as Python Objects

Python 2.5

7.2.5.2 Complex Numbers as Python Objects

This subtype of PyObject represents a Python complex number object.

This instance of PyTypeObject represents the Python complex number type. It is the same object as complex and types.ComplexType.

Return true if its argument is a PyComplexObject or a subtype of PyComplexObject. Changed in version 2.2: Allowed subtypes to be accepted.

Return true if its argument is a PyComplexObject, but not a subtype of PyComplexObject. New in version 2.2.

Return value: New reference.
Create a new Python complex number object from a C Py_complex value.

Return value: New reference.
Return a new PyComplexObject object from real and imag.

Return the real part of op as a C double.

Return the imaginary part of op as a C double.

Return the Py_complex value of the complex number op.

See About this document... for information on suggesting changes.