Commit 6e9492ca authored by Zackery Spytz's avatar Zackery Spytz Committed by Stefan Behnel

Add iterobject.pxd (GH-3452)

The comments are taken from the C API documentation
(https://docs.python.org/3.8/c-api/iterator.html).
parent e9c0ae4b
cdef extern from "Python.h":
###########################################################################
# Iterator Objects
###########################################################################
bint PySeqIter_Check(object op)
# Return true if the type of op is PySeqIter_Type.
object PySeqIter_New(object seq)
# Return value: New reference.
# Return an iterator that works with a general sequence object, seq. The
# iteration ends when the sequence raises IndexError for the subscripting
# operation.
bint PyCallIter_Check(object op)
# Return true if the type of op is PyCallIter_Type.
object PyCallIter_New(object callable, object sentinel)
# Return value: New reference.
# Return a new iterator. The first parameter, callable, can be any Python
# 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.
...@@ -23,6 +23,7 @@ cimport cpython.getargs ...@@ -23,6 +23,7 @@ cimport cpython.getargs
cimport cpython.instance cimport cpython.instance
cimport cpython.int cimport cpython.int
cimport cpython.iterator cimport cpython.iterator
cimport cpython.iterobject
cimport cpython.list cimport cpython.list
cimport cpython.long cimport cpython.long
cimport cpython.longintrepr cimport cpython.longintrepr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment