Naming higher order functions

Oleg Broytmann phd at phd.pp.ru
Thu Jan 31 11:18:07 EST 2002


On Thu, Jan 31, 2002 at 05:04:03PM +0100, Achim Domma wrote:
> this looks interesting to me, but seems not to work with Python 2.1. Should
> it ? If yes, could somebody explain to me why it works ? ;-)

   from __future__ import nested_scopes

> > def name_me(n):
> >     def g(x):
> >         return x[n]
> >     return g

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




More information about the Python-list mailing list