Teks sumber — English
Terjemahan — Bahasa Indonesia
Floating-Point Objects
This subtype of :c:type:`PyObject` represents a Python floating-point object.
This instance of :c:type:`PyTypeObject` represents the Python floating-point type. This is the same object as :class:`float` in the Python layer.
Return true if its argument is a :c:type:`PyFloatObject` or a subtype of :c:type:`PyFloatObject`. This function always succeeds.
Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype of :c:type:`PyFloatObject`. This function always succeeds.
Create a :c:type:`PyFloatObject` object based on the string value in *str*, or ``NULL`` on failure.
Create a :c:type:`PyFloatObject` object from *v*, or ``NULL`` on failure.
Return a C :c:expr:`double` representation of the contents of *pyfloat*. If *pyfloat* is not a Python floating-point object but has a :meth:`~object.__float__` method, this method will first be called to convert *pyfloat* into a float. If :meth:`!__float__` is not defined then it falls back to :meth:`~object.__index__`. This method returns ``-1.0`` upon failure, so one should call :c:func:`PyErr_Occurred` to check for errors.
Use :meth:`~object.__index__` if available.
Gunakan :meth:`~object.__index__` jika tersedia.
object
objek