Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A(object):
- class_attribute = 1
- def __init__(self):
- self.instance_attribute = 2
- class B(A):
- def test1(self):
- print super(B, self).class_attribute
- def test2(self):
- print super(B, self).instance_attribute
- b = B()
- b.test1()
- b.test2()
Add Comment
Please, Sign In to add comment