8
Generator objects are what Python uses to implement generator iterators. They
9
are normally created by iterating over a function that yields values, rather
10
than explicitly calling :cfunc:`PyGen_New`.
13
.. ctype:: PyGenObject
15
The C structure used for generator objects.
18
.. cvar:: PyTypeObject PyGen_Type
20
The type object corresponding to generator objects
23
.. cfunction:: int PyGen_Check(ob)
25
Return true if *ob* is a generator object; *ob* must not be *NULL*.
28
.. cfunction:: int PyGen_CheckExact(ob)
30
Return true if *ob*'s type is *PyGen_Type* is a generator object; *ob* must not
34
.. cfunction:: PyObject* PyGen_New(PyFrameObject *frame)
36
Create and return a new generator object based on the *frame* object. A
37
reference to *frame* is stolen by this function. The parameter must not be