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

Alex Martelli aleax at mac.com
Sat Apr 14 23:07:41 EDT 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