PATH:
usr
/
share
/
doc
/
python-docs-2.7.5
/
html
/
_sources
/
c-api
.. highlightlang:: c .. _gen-objects: Generator Objects ----------------- Generator objects are what Python uses to implement generator iterators. They are normally created by iterating over a function that yields values, rather than explicitly calling :c:func:`PyGen_New`. .. c:type:: PyGenObject The C structure used for generator objects. .. c:var:: PyTypeObject PyGen_Type The type object corresponding to generator objects .. c:function:: int PyGen_Check(ob) Return true if *ob* is a generator object; *ob* must not be *NULL*. .. c:function:: int PyGen_CheckExact(ob) Return true if *ob*'s type is *PyGen_Type* is a generator object; *ob* must not be *NULL*. .. c:function:: PyObject* PyGen_New(PyFrameObject *frame) Create and return a new generator object based on the *frame* object. A reference to *frame* is stolen by this function. The parameter must not be *NULL*.
[-] string.txt
[edit]
[-] long.txt
[edit]
[-] tuple.txt
[edit]
[-] type.txt
[edit]
[-] utilities.txt
[edit]
[-] module.txt
[edit]
[-] reflection.txt
[edit]
[-] list.txt
[edit]
[-] buffer.txt
[edit]
[-] none.txt
[edit]
[-] datetime.txt
[edit]
[-] gcsupport.txt
[edit]
[-] cobject.txt
[edit]
[-] veryhigh.txt
[edit]
[-] init.txt
[edit]
[+]
..
[-] index.txt
[edit]
[-] refcounting.txt
[edit]
[-] gen.txt
[edit]
[-] dict.txt
[edit]
[-] sequence.txt
[edit]
[-] weakref.txt
[edit]
[-] set.txt
[edit]
[-] int.txt
[edit]
[-] class.txt
[edit]
[-] float.txt
[edit]
[-] objimpl.txt
[edit]
[-] mapping.txt
[edit]
[-] abstract.txt
[edit]
[-] import.txt
[edit]
[-] method.txt
[edit]
[-] complex.txt
[edit]
[-] concrete.txt
[edit]
[-] iter.txt
[edit]
[-] function.txt
[edit]
[-] iterator.txt
[edit]
[-] unicode.txt
[edit]
[-] file.txt
[edit]
[-] conversion.txt
[edit]
[-] memory.txt
[edit]
[-] bool.txt
[edit]
[-] object.txt
[edit]
[-] bytearray.txt
[edit]
[-] marshal.txt
[edit]
[-] slice.txt
[edit]
[-] descriptor.txt
[edit]
[-] arg.txt
[edit]
[-] codec.txt
[edit]
[-] code.txt
[edit]
[-] cell.txt
[edit]
[-] number.txt
[edit]
[-] objbuffer.txt
[edit]
[-] sys.txt
[edit]
[-] typeobj.txt
[edit]
[-] exceptions.txt
[edit]
[-] intro.txt
[edit]
[-] allocation.txt
[edit]
[-] structures.txt
[edit]
[-] capsule.txt
[edit]