Keyword arguments - strange behaviour?

Fredrik Lundh fredrik at pythonware.com
Tue Dec 21 09:00:15 EST 2004


<brian.bird at securetrading.com> wrote:

> However, is there a good reason why default parameters aren't evaluated
> as the function is called? (apart from efficiency and backwards compatibility)?

how would you handle this case:

    def function(arg=otherfunction(value)):
        return arg

</F> 






More information about the Python-list mailing list