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