This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author quentin.gallet-gilles
Recipients glubglub, quentin.gallet-gilles
Date 2007-11-13.13:11:41
SpamBayes Score 0.06881969
Marked as misclassified No
Message-id <1194959501.89.0.93447724573.issue1437@psf.upfronthosting.co.za>
In-reply-to
Content
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-static-class-methods


What you're looking for is :

class Blah:
    def __init__(self, s):
        self.arr= []
        self.s = s
...
History
Date User Action Args
2007-11-13 13:11:42quentin.gallet-gillessetspambayes_score: 0.0688197 -> 0.06881969
recipients: + quentin.gallet-gilles, glubglub
2007-11-13 13:11:41quentin.gallet-gillessetspambayes_score: 0.0688197 -> 0.0688197
messageid: <1194959501.89.0.93447724573.issue1437@psf.upfronthosting.co.za>
2007-11-13 13:11:41quentin.gallet-gilleslinkissue1437 messages
2007-11-13 13:11:41quentin.gallet-gillescreate