Abstract and concrete syntax

Mandus mandus at gmail.com
Fri Jun 10 06:43:49 EDT 2005


As someone who like to do functional style programming, but without a
lot of training in that dept., I miss what you ask for from time to
time.

I don't want to go to much into this discussion, just comment on a tiny
little bit:

Thu, 09 Jun 2005 03:32:12 +0200 skrev David Baelde:
[snip]
>
> set_callback(obj,
>              lambda x: (if a:
>                2
>              else:
>                3)
>
[snip]

You can do stuff like this: lambda x: x and 2 or 3

Of course, you are still quite limited in what you can do, but it have
solved some of my problems...

mvh,
-- 
Mandus - the only mandus around.



More information about the Python-list mailing list