title: Using the class as a type hint for arguments in its methods
body: <p>The code I have included below throws the following error:</p>
  
  <pre><code>NameError: name 'Vector2' is not defined 
  </code></pre>
  
  <p>at this line: </p>
  
  <pre><code>def Translate (self, pos: Vector2):
  </code></pre>
  
  <p>Why does Python not recognize my <code>Vector2</code> class in the <code>Translate</code> method?</p>
  
  <pre><code>class Vector2:
  
      def __init__(self, x: float, y: float):
  
          self.x = x
          self.y = y
  
      def Translate(self, pos: Vector2):
  
          self.x += pos.x
          self.y += pos.y
  </code></pre>