Teks sumber — English
Terjemahan — Bahasa Indonesia
Complex Number Objects
Objek Bilangan Kompleks
This subtype of :c:type:`PyObject` represents a Python complex number object.
This instance of :c:type:`PyTypeObject` represents the Python complex number type. It is the same object as :class:`complex` in the Python layer.
Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :c:type:`PyComplexObject`. This function always succeeds.
Return true if its argument is a :c:type:`PyComplexObject`, but not a subtype of :c:type:`PyComplexObject`. This function always succeeds.
Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return ``NULL`` with an exception set on error.
If *op* is not a Python complex number object but has a :meth:`~object.__complex__` method, this method will first be called to convert *op* to a Python complex number object. If :meth:`!__complex__` is not defined then it falls back to call :c:func:`PyFloat_AsDouble` and returns its result.
Use :meth:`~object.__complex__` if available.
Gunakan :meth:`~object.__complex__` jika tersedia.
If *op* is not a Python complex number object but has a :meth:`~object.__complex__` method, this method will first be called to convert *op* to a Python complex number object. If :meth:`!__complex__` is not defined then it falls back to call :c:func:`PyFloat_AsDouble` and returns ``0.0`` on success.
This C structure defines an export format for a Python complex number object.
Create a new Python complex number object from a C :c:type:`Py_complex` value. Return ``NULL`` with an exception set on error.
If *op* is not a Python complex number object but has a :meth:`~object.__complex__` method, this method will first be called to convert *op* to a Python complex number object. If :meth:`!__complex__` is not defined then it falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not defined then it falls back to :meth:`~object.__index__`.
Use :meth:`~object.__index__` if available.
Gunakan :meth:`~object.__index__` jika tersedia.
object
objek