tabular data

Oleg Broytmann phd at phd.russ.ru
Sun Apr 9 12:23:34 EDT 2000


On Sun, 9 Apr 2000 poupaerte at my-deja.com wrote:
> >    nlist = map( lambda x,indices=indices:
> 
> The expression "indices=indices" seems absolutely strange to me. I
> don't have a clue of what it could be doing, except for being true at
> all times.

   Seems you are a novice, just doing your first steps in Python! Welcome! :)

   "indices=indices" is not an expression at all - it is an assignment. The
"lambda" constructs a function in the global namespace, and the function
doesn't have access to local var "indices". The assignment give such
access.

> Is there some kind of lengthier tutorial on the lambda construct; it
> seems quite an advanced construct not easily to be found elsewhere in
> other programming languages, a bit like regexes ...

   It is from LISP, well-known programming language.

Oleg.            (All opinions are mine and not of my employer)
---- 
    Oleg Broytmann      Foundation for Effective Policies      phd at phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list