a=[ lambda t: t**n for n in range(4) ]

Mage mage at mage.hu
Sat Apr 23 03:43:52 EDT 2005


Scott David Daniels wrote:

>
>
> See, the body of your anonymous function just looks for "the current
> value of n" when it is _invoked_, not when it is _defined_.

The "lambda functions" was an unclear part of the tutorial I read.
Should I use them? Are they pythonic?
As far I see they are good only for type less a bit.

       Mage





More information about the Python-list mailing list