I have two classes. How can I refer to a method in the parent class if the method is also defined in the subclass different?
The code is as follows:
class A:
    def __init__(self, num):
        self.value=num
    def f(self, num):
        return self.value+2
class B(A):
    def f(self, num):
        return 7*self.f(num)
 
Also, I want to refer to the parent class A with the "self.f(num)" command, not the method itself in B which would create an infinite recursion. How can I do this?