from __future__ import generators

Neil Schemenauer nas at python.ca
Fri Aug 10 18:00:14 EDT 2001


Jeff Shannon wrote:
> if I've got a module that declares a generator:
...
> And then a second module that imports gen1 and uses that generator....
...
> Would gen2.py also require the __future__ statement?

Nope.  It's only needed in modules that have the yield statement in
them.

  Neil




More information about the Python-list mailing list