[Tutor] Applications/examples of some advanced Py features, please !

Gregor Lingl glingl@aon.at
Sat Jan 4 01:12:02 2003


>
>
>
>Lambda is pretty much used as a convenient way of writing quicky one-shot
>functions for "mapping" and "filtering".  In computer science theory,
>they're pretty important --- in the functional-based languages, lambdas
>are a fundamental building block of computation --- but in Python, they
>play a backstage role: it's often a good thing to just define a new
>function using 'def'.
>  
>

Just to quote Guido (from: 
http://www.python.org/doc/essays/ppt/regrets/PythonRegrets.pdf )

. I've never liked lambda
- crippled (only one expression)
- confusing (no argument list parentheses)
- can use a local function instead

Gregor