Why don't generators execute until first yield?
Marco Mariani
marco at sferacarta.com
Wed May 7 08:37:43 EDT 2008
Duncan Booth wrote:
> Perhaps if you'd copied all of my code (including the decorator that was
> the whole point of it)...
Sure, I missed the point. Python's > symbols become quoting levels and
mess up messages.
Anyway, I would loathe to start execution of a generator before starting
to iterate through it. Especially when generators are passed around.
The current behavior makes perfect sense.
More information about the Python-list
mailing list