PEP 255: Simple Generators

Tim Peters tim at digicool.com
Wed Jun 20 14:31:14 EDT 2001


[Ben Wolfson]
> Wouldn't it be just as useful, or possibly more, if the generators
> allowed brain explosion for those who wanted it, but could still be
> used simply by those who didn't?  Is it necessarily the case that
> adding the capability for more complex use removes the possibility
> of ordinary use?

This is too fuzzy for me to address.  If you have a specific idea in mind,
please spell it out:  the answer depends on what "adding the capability for
more complex use" means, exactly.  Since generators produce an iterator
object, you can very easily tie your head into knots already, if you're
determined to.





More information about the Python-list mailing list