Some syntactic sugar proposals

Ian Kelly ian.g.kelly at gmail.com
Tue Nov 16 00:40:00 EST 2010


On 11/15/2010 10:26 PM, Steven D'Aprano wrote:
> t = foo()+bar()+baz() if pred(it) else baz()-foo()-bar()
>
> What does "it" mean here?

"it" would mean the result of the expression foo()+bar()+baz().  What 
else could it mean?  There are valid objections to the proposal, but the 
intended semantics seem perfectly clear.

Cheers,
Ian




More information about the Python-list mailing list