Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ListMixin(object):
- def list(self):
- return self.get_query()
- class ReciveMixin(object):
- def receive(self):
- return selg.get_query()
- class MyClass(ListMixin, ReciveMixin):
- def get_query(self):
- return 1
- def get_second_query(self):
- return 2
- # to co chcesz, to aby ListMixin korzystało z .get_second_query, a ReciveMixin korzystało z self.get_query()
- # odpowiedź: nie da się tego zrobić "dziedziczeniem". Musisz nadpiać metodę .list()
Advertisement
Add Comment
Please, Sign In to add comment