Abstract and concrete syntax

David Baelde david.baelde at ens-lyon.fr
Sat Jun 11 13:25:52 EDT 2005


>>> You can do stuff like this: lambda x: x and 2 or 3
>>    lambda x: {True:2,False:3}.get(bool(a))

And by the way, I just noticed that this kind of hack is essentially
"pushing the control (statement) inside expressions"... People should
really admit that statements are expressions and stop twist their mind.

I sure can write unreadable python without statement-as-expressions, and
this is an example of it.



More information about the Python-list mailing list