lambda question

Fredrik Lundh fredrik at pythonware.com
Mon Mar 11 14:22:40 EST 2002


Fredrik Lundh wrote:
> if so, the following should do the trick:
>
>     def exe1(f,list):
>         return map(lambda x,list=list:eval(f),list)

doh.  should of course be:

     def exe1(f,list):
         return map(lambda x,f=f:eval(f), list)

</F>





More information about the Python-list mailing list