[ create a new paste ] login | about

Link: http://codepad.org/dhPF26ay    [ raw code | output | fork ]

Python, pasted on Nov 3:
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


Output:
1
[5]


Create a new paste based on this one


Comments: