title: Why it is compulsory to give classname while using super() in Python
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/466611/why-do-i-have-to-specify-my-own-class-when-using-super-and-is-there-a-way-to">Why do I have to specify my own class when using super(), and is there a way to get around it?</a>  </p>
  </blockquote>
  
  
  
  <p>I was reading this book - <code>"Core Python Programming"</code>, and I really found it very nice I would say. But I got confused at a point while I was studying the topic Inheritance..</p>
  
  <p>The book somewhere said that- we can use <code>super()</code> to invoke <code>super class method</code> which will find the base class method for us and also we don't need to pass <code>self</code> explicitly, like we do without super..</p>
  
  <p>Here's the sample code: - </p>
  
  <pre><code># Invoking super class method without super() .. Need to pass `self` as argument
  class Child(Parent):
      def foo(self):
          Parent.foo(self)
  
  # Invoking with super().
  # No need to pass `self` as argument to foo()
  class Child(Parent1, Parent2):
      def foo(self):
          super(Child, self).foo()
          print 'Hi, I am Child-foo()'
  </code></pre>
  
  <p>My Question is -  why we have to pass the <code>classname</code> to <code>super()</code> call.. As the classname can be inferred from the class from which super is invoked.. </p>
  
  <p>So, since super() is invoked from 
  <code>class Child</code>, classname should be implicit there.. So why do we need that??</p>
  
  <p>*EDIT: - Giving <code>Child</code> as a parameter to super() doesn't make sense, because it doesn't give any information.. We could have used <code>super(self)</code>.. And the method would have been searched in the super classes in the order they are given inside parenthesis..</p>