Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # overload parent @classmethod and @staticmethod
- class Parent:
- @classmethod
- def test_classmethod(self):
- print('Parent test_classmethod', self)
- @staticmethod
- def test_staticmethod():
- print('Parent test_staticmethod')
- class Child(Parent):
- @classmethod
- def test_classmethod(self):
- print('Child test_classmethod', self)
- @staticmethod
- def test_staticmethod():
- print('Child test_staticmethod')
- Parent.test_classmethod()
- Parent.test_staticmethod()
- Child.test_classmethod()
- Child.test_staticmethod()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement