1 2 3 4 5 6 7 8 9 10 11
class A(object): def __init__( self, p = [] ): self.p = p a = A() a.p.append(5) b = A([1,2,3]) c = A() print c.p
1
[5]