[Tutor] map, filter and lambda functions
Thu, 23 Aug 2001 11:03:55 +0200
On 0, Sheila King <firstname.lastname@example.org> wrote:
> Ah, thanks. That's what I was missing. It certainly wasn't clear to me
> from anything that I had read, that it was supposed to be a function
> OBJECT as opposed to a function invocation.
If you give a function invocation as an argument, like say:
What happens is that otherfunc(x) is called, and its *result* is passed to
somefunc. That's true for all Python expressions, and therefore for map() as
Map() needs to have some object it can call, usually a function object, it
can fill in the arguments by itself. It couldn't do much with only the
result for some x.