Objeto Generator
****************

Objetos geradores são o que o Python usa para implementar iteradores
geradores. Eles são normalmente criados por iteração sobre uma função
que produz valores, em vez de invocar explicitamente "PyGen_New()" ou
"PyGen_NewWithQualName()".

PyGenObject

   A estrutura C usada para objetos geradores.

PyTypeObject PyGen_Type

   O objeto de tipo correspondendo a objetos geradores.

int PyGen_Check(PyObject *ob)

   Return true if *ob* is a generator object; *ob* must not be *NULL*.

int PyGen_CheckExact(PyObject *ob)

   Return true if *ob*'s type is *PyGen_Type*; *ob* must not be
   *NULL*.

PyObject* PyGen_New(PyFrameObject *frame)
    *Return value: New reference.*

   Create and return a new generator object based on the *frame*
   object. A reference to *frame* is stolen by this function. The
   argument must not be *NULL*.

PyObject* PyGen_NewWithQualName(PyFrameObject *frame, PyObject *name, PyObject *qualname)
    *Return value: New reference.*

   Create and return a new generator object based on the *frame*
   object, with "__name__" and "__qualname__" set to *name* and
   *qualname*. A reference to *frame* is stolen by this function.  The
   *frame* argument must not be *NULL*.
