May 19, 2009
8:34 p.m.
On Tue, May 19, 2009 at 10:31:00PM +0200, Pascal Chambon wrote:
I could content myself of the proposed solution : @dynamic def func (a, b = lambda : []): pass But I just dislike the fact that the "dynamic" applies to all the defaults, even those which weren't supposed to be dynamic (and writing "lambda : lambda : []") doesn't look good). Would there be any way of separating "to-be-called" lambdas from normal ones ? Except with a syntax like "b = dyn(lambda: [])" ?
@dynamic('b') def func (a, b = lambda : []): pass Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.