Re: unexpected class behaviour

2008-09-07 Thread kaer
On 7 sep, 12:40, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Jan Schäfer wrote: > > can anyone explain the behaviour of the following code sniplet: > > well, it *is* explained in the tutorial, the language reference, and the > FAQ, so yes, it can be explained ;-) > > for more information, see this p

Re: unexpected class behaviour

2008-09-07 Thread Fredrik Lundh
Jan Schäfer wrote: can anyone explain the behaviour of the following code sniplet: well, it *is* explained in the tutorial, the language reference, and the FAQ, so yes, it can be explained ;-) for more information, see this page: http://effbot.org/zone/default-values.htm -- http://m

unexpected class behaviour

2008-09-07 Thread Jan Schäfer
Hi all, can anyone explain the behaviour of the following code sniplet: ---> schnipp <--- class Base(object): def __init__( self, lst=[] ): self.varlist = lst def addVar( self, var ): self.varlist.append(var) class Derived(Base): def __init__( self, var ):