anonymous functions/expressions without lambda?

Michael Hoffman cam.ac.uk at mh391.invalid
Thu Apr 28 14:45:21 EDT 2005


Dave Benjamin wrote:

> I think you meant to write something like this:
> 
> def attrsetter(obj, name, value):
>     def _return_func():
>         return setattr(obj, name, value)
>     return _return_func

Sure did. Sorry.
-- 
Michael Hoffman



More information about the Python-list mailing list