Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Document range objects as well.
  • Loading branch information
ZeroIntensity committed Nov 4, 2025
commit 5ca81a4fcad7e95085d624b18e4a0965d8afc701
29 changes: 28 additions & 1 deletion Doc/c-api/iterator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,33 @@ sentinel value is returned.
*sentinel*, the iteration will be terminated.


.. _other-builtin-types:

.. _range-objects:
Range Objects
^^^^^^^^^^^^^

.. c:var:: PyTypeObject PyRange_Type

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


.. c:var:: PyTypeObject PyRangeIter_Type

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


.. c:var:: PyTypeObject PyLongRangeIter_Type

The type object for iterators over :class:`range` objects with large bounds.


Comment thread
ZeroIntensity marked this conversation as resolved.
Outdated
.. 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.


.. _other-builtin-iterator-types:

Other Builtin Iterator Types
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -78,3 +104,4 @@ provide no additional functions. They are here for completeness.
.. c:var:: PyTypeObject PyZip_Type

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

Loading