Somthing strange with list as default argument
Duncan Booth
duncan.booth at invalid.invalid
Wed Sep 22 04:33:56 EDT 2004
More information about the Python-list mailing list
Wed Sep 22 04:33:56 EDT 2004
- Previous message (by thread): Somthing strange with list as default argument
- Next message (by thread): Somthing strange with list as default argument
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Julien Sagnard wrote: > When passing a list as default argument for a function, only one list is > created for all calls. > exemple: <example snipped> > > I'm not found any reference of this. Is it a bug ? > I'm working on Windows 2000 with python 2.3.4 > You didn't search hard enough (although its not that easy a thing to search for if you don't know the answer). Please read the FAQ: http://www.python.org/doc/faq/general.html#why-are-default-values-shared-between-objects
- Previous message (by thread): Somthing strange with list as default argument
- Next message (by thread): Somthing strange with list as default argument
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list