Bizarre method keyword-arg bug.

Fredrik Lundh fredrik at pythonware.com
Mon Aug 18 11:00:38 CEST 2008


Fredrik Lundh wrote:

> default argument values are evaluated when the function object is 
> created (by the "def" statement, that is), not when the resulting 
> function is called.  if you mutate the default values, the mutations 
> will stick.

and yes, workarounds and further details are provided here:

     http://effbot.org/zone/default-values.htm

</F>




More information about the Python-list mailing list