Scope confusion...

Rene Pijlman at de.nieuwsgroep
Tue Jan 21 02:24:15 CET 2003

Kevin at
>I had a perplexing problem 
>def a(list = []):
>I would expect it to print "['test']" twenty times, correct?  It doesn't.

This is explained in section 4.7.1 of the Python tutorial:

René Pijlman

Wat wil jij leren?

More information about the Python-list mailing list