Empty list as default parameter

Paul Rubin http
Sat Nov 22 22:05:58 EST 2003


bokr at oz.net (Bengt Richter) writes:
> Yes. The bindings of default values for call args are evaluated at
> define-time, in the context of the definition, not at execution
> time, when the function is called.

That's always seemed like a source of bugs to me, and ugly workarounds
for the bugs.  Is there any corresponding disadvantage to eval'ing the
defaults at runtime as is done in other languages?




More information about the Python-list mailing list