A performance issue when using default value

alex23 wuwei23 at gmail.com
Mon Feb 1 06:58:06 CET 2010

keakon <kea... at gmail.com> wrote:
> The default value is mutable, and can be reused by all each call.
> So each call it will append 1 to the default value, that's very
> different than C++.

Being different from C++ is one of the many reasons some of us choose
Python ;)

This tends to bite most newcomers, so it's mentioned in the FAQ:

More information about the Python-list mailing list