Error when trying to overload an operator “/”
问题 I recently start teaching myself game programming. Someone recommend me to start with Python and I got the book "Beginning game development with Python and Pygame: From novice to professional". I got to a part where they teach about Vectors and creating a Vector2 class. Everything was going well until I tried to overload the division operator. My code goes like this: class Vector2(object): def __init__(self, x=0.0, y=0.0): self.x = x self.y = y def __str__(self): return "(%s, %s)"%(self.x,