Assume, I have similar code:
class Parent:
CONST_VAL = '1'
def calc(self):
return self.CONST_VAL
class Child(Parent):
CONST_VAL = 'child'
def calc(self):
return super().calc() + self.CONST_VAL
And then I execute the following:
c = Child()
c.calc()
>> childchild
I expect it to be '1child', but it's not.
Is there a right way to make a class-variable isolation of super methods like in C++?