[code]
 #classify "Point"
 class Point(object):
         def _init_(self, x, y):  <--- This is your problem
                 self.x = x
                 self.y = y
[/code]

That should be '__init__'. Two underscores before and after. But,
IMHO, I don't think a class is really necessary unless you are going
to build in compare facilities. You might as well just use a tuple:

[code]
from random import randint
pt = (randint(1,20),randint(1,20))
...
x,y = pt
x = pt[0]
y = pt[1]
[/code]

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to