Author miedzinski
Recipients miedzinski, moird
Date 2019-07-18.22:32:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1563489133.16.0.181913854979.issue37625@roundup.psfhosted.org>
In-reply-to
Content
This is expected, because list is created during class definition, not initialization. You should initialize `variable` in __init__.

class TestClass(object):
    def __init__(self):
        self.variable = []

for num in range(10):
    test = TestClass()
    test.variable.append(num)
History
Date User Action Args
2019-07-18 22:32:13miedzinskisetrecipients: + miedzinski, moird
2019-07-18 22:32:13miedzinskisetmessageid: <1563489133.16.0.181913854979.issue37625@roundup.psfhosted.org>
2019-07-18 22:32:13miedzinskilinkissue37625 messages
2019-07-18 22:32:13miedzinskicreate