Weird side effect of default parameter

Robert Latest boblatest at yahoo.com
Mon May 7 11:05:58 EDT 2018


Steven D'Aprano wrote:
> Python function default values use *early binding*: the default parameter 
> is evaluated, ONCE, when the function is defined, and that value is used 
> each time it is needed.

Thanks, "early binding" was the clue I was missing.

robert



More information about the Python-list mailing list