Re: exec and closures

2008-02-21 Thread alitosis
On Feb 22, 3:18 am, Peter Otten <[EMAIL PROTECTED]> wrote: > Alejandro Dubrovsky wrote: > > def autoassign(_init_): > > import inspect > > import functools > > > argnames, _, _, defaults = inspect.getargspec(_init_) > > argnames = argnames[1:] > > > indentati

Re: exec and closures

2008-02-21 Thread Peter Otten
Alejandro Dubrovsky wrote: > About a month ago, there was a thread on auto-assigning decorators for > __init__. One by André Roberge is here: > http://groups.google.com/group/comp.lang.python/browse_frm/ > thread/32b421bbe6caaeed/0bcd17b1fa4fb07c?#0bcd17b1fa4fb07c > > This works well for simple

exec and closures

2008-02-21 Thread Alejandro Dubrovsky
About a month ago, there was a thread on auto-assigning decorators for __init__. One by André Roberge is here: http://groups.google.com/group/comp.lang.python/browse_frm/ thread/32b421bbe6caaeed/0bcd17b1fa4fb07c?#0bcd17b1fa4fb07c This works well for simple cases, but doesn't take keyword argumen