>>> 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. -- http://mail.python.org/mailman/listinfo/python-list