Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Parent(object):
- x = 1
- class Child1(Parent):
- pass
- class Child2(Parent):
- pass
- print Parent.x, Child1.x, Child2.x
- Child1.x = 2
- print Parent.x, Child1.x, Child2.x
- Parent.x = 3
- print Parent.x, Child1.x, Child2.x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement