On Mon, Oct 5, 2009 at 4:41 PM, David Perlman <dperl...@wisc.edu> wrote:
> I fixed this by changing it to "mods=None" and then setting it in the body > of the __init__ method. Works fine now. That is the correct fix. > My question is, is this just a quirky misbehavior, or is there a principled > reason why the code I have shown above only instantiates the empty list in > the arguments once? This is a FA. Default arguments are shared between all uses: http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor