[Python-Dev] PEP 340 -- loose ends

Shane Hathaway shane at hathawaymix.org
Thu May 5 06:36:43 CEST 2005


Shane Holloway (IEEE) wrote:
> Another thing.  In the specification of the Anonymous Block function, is 
> there a reason that "itr = EXPR1" instead of "itr = iter(EXPR1)"?  It 
> seems to be a dis-symmetry with the 'for' loop specification.

Hmm... yeah.  That's strange.  In fact, if it gets changed to "itr =
iter(EXPR1)", as it probably ought to, all of the existing examples will
continue to work.  It will also be safe to start block iterators with a
single variable, nullifying my argument about parentheses.

So Reinhold's examples stand, except for the "try" block, since it
clashes with a keyword.  They read well, but when something goes wrong
in the code, how would a new programmer crack these nuts?

    with:
        (...)

    synchronized:
        (...)

    transaction:
        (...)

> Thanks,
> -Shane (Holloway)  ;)

Once in a while I read a post by Shane H????way and start wondering when
I wrote it and how I could've forgotten about it.  And then I realize I
didn't. :-)

Shane


More information about the Python-Dev mailing list