My code gave the error message:
File "python", line 2
init(self, x, y, z):
SyntaxError: invalid syntax
It's not showing it in the pasted error message, but the init does have the underscores around it, and the "^" is pointing to the colon. Couldn't find anything on Stack Overflow, so I came here and posted it.
class Point3D(object): __init__(self, x, y, z): self.x = x self.y = y self.z = z __repr__(self): return "(%d, %d, %d)" % (self.x, self.y, self.z) my_point = Point3D(1, 2, 3) print my_point