Guest User

Untitled

a guest
Oct 17th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. class A(object):
  2. class_attribute = 1
  3. def __init__(self):
  4. self.instance_attribute = 2
  5.  
  6. class B(A):
  7. def test1(self):
  8. print super(B, self).class_attribute
  9.  
  10. def test2(self):
  11. print super(B, self).instance_attribute
  12.  
  13. b = B()
  14. b.test1()
  15. b.test2()
Add Comment
Please, Sign In to add comment