tabular data
Daniel Berlin
dan at cgsoftware.com
Sun Apr 9 12:22:17 EDT 2000
On Sun, 9 Apr 2000 poupaerte at my-deja.com wrote:
> Hi
>
> > def sortedby(list,*indices):
>
> I didn't know Python worked with pointers, or else what does *indices
> mean? The fine manuals do not explain the *var construct ...
It's not a pointer, it's a tuple of the rest of the arguments passed in.
def test(a,*b):
print "a",a,"b",b
>>> test(5,6,7,8,9,10,11)
a 5 b (6, 7, 8, 9, 10, 11)
>
> > 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.
>
i missed the rest of the message, so i can't tell without the rest of the
map command.
> 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 ...
I want to say lambda originated in LISP, but i could be wrng.
It's used extensively in lisp and scheme.
>
> Greetings
> Erik
>
More information about the Python-list
mailing list