[issue5620] The attribute's action of an object is not correct.

2009-04-01 Thread edmundy
edmundy added the comment: Thanks a lot! Kozyarchuk. I have thought the self.myurl should be the object variable, not class variable. The class variable really is confusing. Why do they like that? -- status: open -> closed ___ Python tracker

[issue5620] The attribute's action of an object is not correct.

2009-03-31 Thread Maksim Kozyarchuk
Maksim Kozyarchuk added the comment: AFAIK, This is expected behavior. myurl is a class attribute if you want it to be different per instance you should re-initialize it in the __init__ method. See below. >>> class C1(object): ... def __init__(self): ... self.myurl = [] ...

[issue5620] The attribute's action of an object is not correct.

2009-03-31 Thread edmundy
New submission from edmundy : The following is the test code. class C1: myurl = [] def test(self): url = [5,6,7] self.myurl.extend(url) def testv(): c = C1() c.test() print(c.myurl) i = 0 while i<10