Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> FWIW, the equivalent in idiomatic Python3 is:
Thanks, interesting idea to turn it inside out!¹ =) But why Python3, AFAIK generators were already introduced in 2. > while back a monstrosity was released... Thanks, even more fun! =) Especially the last line (after "bugs and limitations")
Oh, and almost forgot: We are sorry, Guido. So sorry. Grin! xD
Cheers Rolf ( addicted to the Perl Programming Language)
update¹) while its a bit cumbersome that you need to iterate over the yields... ... why not using a decorator to abstract the loop away?
updatethis worked for me in Py 2.5.2
In reply to Re^4: RFC: Simulating Ruby's "yield" and "blocks" in Perl (Python)
by LanX
|
|