Unexpected behavior when initializing class

Duncan Booth duncan.booth at invalid.invalid
Wed Nov 28 10:08:00 CET 2007

Paul Rudin <paul.nospam at rudin.co.uk> wrote:

> You have to understand that the default value for v - an empty list -
> is made at compile time

Not at compile time: the default value is created at runtime when the def 
statement is executed.

More information about the Python-list mailing list