On Apr 17, 9:36 am, livibetter <[EMAIL PROTECTED]> wrote: > On Apr 17, 8:56 am, "matthewperpick" <[EMAIL PROTECTED]> wrote: > > > Check out this toy example that demonstrates some "strange" behaviour > > with keyword arguments and inheritance. > > > ================================= > > > class Parent: > > def __init__(self, ary = []): > > self.ary = ary > > This should work: > > class Parent: > def __init__(self, ary = []): > self.ary = list(ary) > > And > FYIhttp://groups.google.com/group/comp.lang.python/browse_thread/thread/...
livibetter has a better solution. the reason is that you need to create a new list object everytime, am I right? -- http://mail.python.org/mailman/listinfo/python-list