Where is quote (again)?

Gerhard Häring gh_pythonlist at gmx.de
Fri Mar 8 10:38:01 EST 2002


Le 08/03/02 à 07:21, N Becker écrivit:
> Back in 1999, I asked "where is quote?".  I was looking for
> a way to quote a function (delay evaluation).
> 
> I wonder if there is anything new.  It looks to me that the 
> best answer is to use lambda.
> 
> example:
> 
> def f():
>   return lambda: os.chmod(""/root/.rhosts", 0644)
> 
> def g():
>   f()
 
Just out of interest: what's that good for?

Gerhard
-- 
This sig powered by Python!
Außentemperatur in München: 10.4 °C      Wind: 3.1 m/s




More information about the Python-list mailing list