pre-PEP: Simple Thunks
Brian Sabbey
sabbey at u.washington.edu
Sun Apr 17 18:32:56 EDT 2005
Bengt Richter wrote:
> Hm, one thing my syntax does, I just noticed, is allow you
> to pass several thunks to a thunk-accepter, if desired, e.g.,
> (parenthesizing this time, rather than ending ():<suite> with
> dedented comma)
>
> each(
> ((i): # normal thunk
> print i),
> ((j): # alternative thunk
> rejectlist.append(j)),
> [1,2])
>
> <snip>
>
I see that it might be nice to be able to use multiple thunks, and to be
able to specify the positions in the argument list of thunks, but I think
allowing a suite inside parentheses is pretty ugly. One reason is that it
is difficult to see where the suite ends and where the argument list
begins again. I'm not sure even what the syntax would be exactly. I
suppose the suite would always have to be inside its own parentheses?
Also, you wind up with these closing parentheses far away from their
corresponding open parentheses, which is also not pretty. It's getting
too Lisp-like for my tastes.
-Brian
More information about the Python-list
mailing list