Is it explicitly specified?

André Malo auch-ich-m at
Tue Feb 5 11:03:19 CET 2008

* George Sakkis wrote:

> On Feb 4, 6:53 am, André Malo <auch-ic... at> wrote:
>> Consider the function being part of a bigger system, where it's called
>> from another function or method which should "inherit" the default value
>> of the function, like:
>> def g(foo, bar, x=None):
>>    ...
>>    f(x=x)
>> Now if you change the default value of f(x) for some reason, you don't
>> have to wind up all the possible caller signatures to reflect that
>> change.
> You might find handy a decorator I've written exactly for this
> scenario, reusing default arguments across functions:

Although it's limited to certain use cases and hence not applicable in all
the situations, it's a very nice idea :-)

Winnetous Erbe: <>

More information about the Python-list mailing list