Answer the question
In order to leave comments, you need to log in
How to make a separate class attribute for each subclass?
Depends on a simple task: let's say there is a Super class with a class attribute a=5 b and a get_sum method:
class Super:
a = 5
def get_sum(self):
self.b = (?).a + 5
class SubClass(Super):
a = 8
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question