File: iterobject.pxd

package info (click to toggle)
cython 0.29.21-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,848 kB
  • sloc: python: 67,537; ansic: 14,505; cpp: 1,340; xml: 1,031; makefile: 367; lisp: 206; sed: 11; sh: 7
file content (24 lines) | stat: -rw-r--r-- 1,036 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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.