FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-141004: Document missing built-in iterator types in the C API by ZeroIntensity · Pull Request #141006 · python/cpython · GitHub

/ cpython Public
39 changes: 39 additions & 0 deletions Doc/c-api/iterator.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,45 @@ sentinel value is returned.
*sentinel*, the iteration will be terminated.


Range Objects
^^^^^^^^^^^^^

.. c:var:: PyTypeObject PyRange_Type

The type object for :class:`range` objects.


.. c:function:: int PyRange_Check(PyObject *o)

Return true if the object *o* is an instance of a :class:`range` object.
This function always succeeds.


Builtin Iterator Types
^^^^^^^^^^^^^^^^^^^^^^

These are built-in iteration types that are included in Python's C API, but
provide no additional functions. They are here for completeness.


.. list-table::
:widths: auto
:header-rows: 1

* * C type
* Python type
* * .. c:var:: PyTypeObject PyEnum_Type
* :py:class:`enumerate`
* * .. c:var:: PyTypeObject PyFilter_Type
* :py:class:`filter`
* * .. c:var:: PyTypeObject PyMap_Type
* :py:class:`map`
* * .. c:var:: PyTypeObject PyReversed_Type
* :py:class:`reversed`
* * .. c:var:: PyTypeObject PyZip_Type
* :py:class:`zip`


Other Iterator Objects
^^^^^^^^^^^^^^^^^^^^^^

Expand Down
Loading

Back | FazBrowse Home | New Git URL