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

[3.14] gh-141004: Document built-in iterator types in the C API (GH-141006) by miss-islington · Pull Request #141134 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
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