summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/iterator.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/c-api/iterator.rst')
-rw-r--r--Doc/c-api/iterator.rst14
1 files changed, 13 insertions, 1 deletions
diff --git a/Doc/c-api/iterator.rst b/Doc/c-api/iterator.rst
index 4d91e4a..3931bb9 100644
--- a/Doc/c-api/iterator.rst
+++ b/Doc/c-api/iterator.rst
@@ -1,4 +1,4 @@
-.. highlight:: c
+.. highlightlang:: c
.. _iterator-objects:
@@ -18,11 +18,15 @@ sentinel value is returned.
one-argument form of the :func:`iter` built-in function for built-in sequence
types.
+ .. versionadded:: 2.2
+
.. c:function:: int PySeqIter_Check(op)
Return true if the type of *op* is :c:data:`PySeqIter_Type`.
+ .. versionadded:: 2.2
+
.. c:function:: PyObject* PySeqIter_New(PyObject *seq)
@@ -30,17 +34,23 @@ sentinel value is returned.
iteration ends when the sequence raises :exc:`IndexError` for the subscripting
operation.
+ .. versionadded:: 2.2
+
.. c:var:: PyTypeObject PyCallIter_Type
Type object for iterator objects returned by :c:func:`PyCallIter_New` and the
two-argument form of the :func:`iter` built-in function.
+ .. versionadded:: 2.2
+
.. c:function:: int PyCallIter_Check(op)
Return true if the type of *op* is :c:data:`PyCallIter_Type`.
+ .. versionadded:: 2.2
+
.. c:function:: PyObject* PyCallIter_New(PyObject *callable, PyObject *sentinel)
@@ -48,3 +58,5 @@ sentinel value is returned.
callable object that can be called with no parameters; each call to it should
return the next item in the iteration. When *callable* returns a value equal to
*sentinel*, the iteration will be terminated.
+
+ .. versionadded:: 2.2