[Python-Dev] Re: anonymous blocks
Phillip J. Eby
pje at telecommunity.com
Wed Apr 27 17:10:41 CEST 2005
At 04:37 AM 4/26/05 -0700, Guido van Rossum wrote:
>*Fourth*, and this is what makes Greg and me uncomfortable at the same
>time as making Phillip and other event-handling folks drool: from the
>previous three points it follows that an iterator may *intercept* any
>or all of ReturnFlow, BreakFlow and ContinueFlow, and use them to
>implement whatever cool or confusing magic they want.
Actually, this isn't my interest at all. It's the part where you can pass
values or exceptions *in* to a generator with *less* magic than is
currently required.
This interest is unrelated to anonymous blocks in any case; it's about
being able to simulate lightweight pseudo-threads ala Stackless, for use
with Twisted. I can do this now of course, but "yield expressions" as
described in PEP 340 would eliminate the need for the awkward syntax and
frame hackery I currently use.
More information about the Python-Dev
mailing list