Please comment on Draft PEP for Enhanced Generators
Pete Shinners
pete at shinners.org
Wed Jan 30 12:50:02 EST 2002
Raymond Hettinger wrote:
> I have written a draft PEP summarizing proposed enhancements to generators:
> http://users.javanet.com/~othello/download/genpep.htm
>
> The draft reflects all the comments I've received to date on the threads
> where
> the ideas where first proposed.
>
> Please post your comments (and maybe a little encouragment) here on
> comp.lang.py or email them directly to me.
i have one small request for generators. it may actually be a bad idea
but i sure can't guess why it would be. perhaps it can be added to your
PEP if it is going to get implemented. it sure looks good to me, so i
hope it does get implented.
anyways, i would like the be able to simply call "yield" with no
arguments and have it yield None. basically the same as the "return"
keyword works.
i want to use generators like little mini-threads, and really don't care
about what it really yields. in my current tests i've just done "yield
0" or "yield None", but i think the code would be clearer if i just
could say "yield".
interesting ideas on the 'two way yield'. i'm curious to see what comes
of that :]
More information about the Python-list
mailing list