Building unusable clas*es!


#1

help I cant seam to put my finger on what I'm doing wrong. thanks

class Point3D(object):
def int(self, x, y, z):
self.x = x
self.y = y
self.z = z

def __repr__(self):
    return "(%d, %d, %d)" % (self.x, self.y, self.z)

my_point = Point3D (1, 2, 3)

print my_point

this is my error message : Oops, try again. Make sure you define your own init() for the Point3D class.


#2

Where you have __int__ should be, __init__.


#3

thank you for pointing it out. for the life of me I couldn't see what was wrong lol thanks again


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.