title: How is Python able to recognize which method is assigned to two different class methods that have the same name
body: <p>Hi I've been following tech with tim's videos on programming a simple 2D game. I understand the code he has written but I don't understand the logic of python is able to know which class to select. </p>
  
  <p>'''</p>
  
  <pre><code>class player():
      def __init__(self, x, y, width, height):
          self.x = x
          self.y = y
          self.width = width
          self.height = height
          self.vel = 5
          self.isJump = False
          self.jumpCount = 10
          self.left = False
          self.right = False
          self.walkCount = 10
          self.standing = True
  
      def draw(self, window):
          if self.walkCount + 1 &gt;= 27:
              self.walkCount = 0
          if not self.standing:
              if self.left:
                  window.blit((walkLeft[self.walkCount // 3]), (self.x, round(self.y)))
                  self.walkCount += 1
              elif man.right:
                  window.blit((walkRight[self.walkCount // 3]), (self.x, round(self.y)))
                  self.walkCount += 1
          else:
              if self.right:
                  window.blit(walkRight[0], (self.x, round(self.y)))
                  self.walkCount += 1
              else:
                  window.blit(walkLeft[0], (self.x, round(self.y)))
                  self.walkCount += 1
  
  
  class projectile():
      def __init__(self, x, y, radius, color, facing):
          self.x = x
          self.y = y
          self.radius = radius
          self.color = color
          self.facing = facing
          self.vel = 8 * facing
  
      def draw(self, window):
          pygame.draw.circle(window, self.color, (self.x, round(self.y)), self.radius)
  
  
  def RedrawGameWindow():
      window.blit(bg, (0, 0))
      for bullet in bullets:
          bullet.draw
      man.draw(window)
  </code></pre>
  
  <p>later on there is a loop that adds the projectile's coordinates, color, direction ... to a list named bullets. </p>
  
  <pre><code>bullets.append(projectile((man.x + man.width//2), (man.y +man.height//2)),6, (0, 0, 0), facing)
  </code></pre>
  
  <p>However I don't understand why I can just call the draw method from the projectile class without first associating it to a variable and then calling .draw to select specifically the method from the projectile class.( and not the one from player class)</p>