function with list argument defaulting to [] - what's going on here???

Alex Martelli aleax at mac.com
Sun Apr 15 05:07:41 CEST 2007


Mike <mmoum at woh.rr.com> wrote:
   ...
> Why is "r" not being reset to the empty list on subsequent calls? It 
> seems like it should be reinitialized when not explicitly provided.

<http://www.python.org/doc/faq/general/#why-are-default-values-shared-be
tween-objects>


Alex



More information about the Python-list mailing list