Building Useful Cless Error


My error says this:
File "python", line 10
my_point = Point3D(1,2,3)
SyntaxError: invalid syntax

Replace this line with your codeclass Point3D(object):
    def __init__(self, x, y, z):
        self.x = x
        self.y = y
        self.z = z
    def __repr__(self):
        returns ("%d, %d, %d)" %(self.x, self.y, self.z)
my_point = Point3D(1,2,3)
print my_point.__repr__.


returns? are you certain about that? I think it should be return

Also, take a look at your parentheses in the line above the error message. One of the parentheses is inside your string, while it shouldn't be


Ah! Thanks very much!