functions which take functions

Kiuhnm kiuhnm03.4t.yahoo.it
Thu Apr 12 19:07:57 EDT 2012


On 4/12/2012 19:29, Jan Kuiken wrote:
> On 4/9/12 20:57 , Kiuhnm wrote:
>
>> Do you have some real or realistic (but easy and self-contained)
>> examples when you had to define a (multi-statement) function and pass it
>> to another function?
>
> I don't use it daily but the first argument of list.sort, i.e. the
> compare function springs to mind.

Yes, I guess there are times when a lambda is not enough and one needs 
to define a real function.
Thanks.

Kiuhnm



More information about the Python-list mailing list