Raymond Hettinger added the comment:
Sorry, that is correct behavior for class variables.
To get your intended effect (independent lists) do the list instantiation
inside the __init__ method.
--
nosy: +rhettinger
resolution: -> invalid
status: open -> closed
New submission from Austin Howard :
When creating a class which contains elements that are lists, the lists for
different instances of the class are not independent. Calling
self.mylist.append(3)
inside a class method will update the mylist variable for *all* instances of
the class, not just th