Why is self a required parameter for a method? : <p>Let's say that I have a tiny code like this:</p>

<pre><code>#!/usr/bin/env python3

class Dog():

  def __init__(self, name, age):
    self.name = name
    self.age = age

  def sit(self):
    print(self.name + " is now sitting.")

my_dog = Dog('willie',6)
my_dog.sit()
</code></pre>

<p>As I understand, the line <code>my_dog = Dog('willie',6)</code> creates an instance named <code>my_dog</code>. It calls the <code>__init__</code> function, converts it internally to <code>Dog.__init__(my_dog, willie, 6)</code> and sets the <code>my_dog.name</code> and <code>my_dog.age</code> variables to <code>willie</code> and <code>6</code>? Now when the <code>my_dog.sit()</code> is executed, then why does the method <code>sit()</code> require a <code>self</code> as a parameter? Is it because if there is another instance of the same class(for example, <code>your_dog</code>), then it knows to use <code>your_dog.name</code> instead of <code>my_dog.name</code>?</p>
