title: how to refer to a parent method in python?
body: <p>Suppose I have two classes (one a parent and one a subclass). How do I refer to a method in the parent class if the method is also defined in the subclass different?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>In the very last line, 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. Thank you in advance.</p>