[issue1437] List member inside a class is shared by all instances of the class

2007-11-13 Thread Christian Heimes
Christian Heimes added the comment: It's a known feature - and a known gotcha for new Python developers. -- nosy: +tiran resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> _

[issue1437] List member inside a class is shared by all instances of the class

2007-11-13 Thread Quentin Gallet-Gilles
Quentin Gallet-Gilles added the comment: That's the expected behavior, actually. The variables 'arr' and 's' are static variables in the class Blah. This is discussed in several places in the doc and the FAQ, e.g. http://www.python.org/doc/faq/programming/#how-do-i-create-static-class-data-and-st

[issue1437] List member inside a class is shared by all instances of the class

2007-11-13 Thread glubglub
New submission from glubglub: In the class below, 'arr' list should be unique for each instance of class Blah. In reality, 'arr' is shared by all instances of 'Blah' class Blah: arr = []# this member should not be # shared across all instances of blah s