[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 a
On Feb 6, 4:08 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Tue, 06 Feb 2007 20:35:43 -0300, <[EMAIL PROTECTED]> escribió:
>
>
>
> > Anyways heres my error:
> >
> > **
En Tue, 06 Feb 2007 20:35:43 -0300, <[EMAIL PROTECTED]> escribió:
> Anyways heres my error:
>
> ***File "C:/Documents and Settings/Eric/Desktop/Python/2d guessing
> game.py", li
[EMAIL PROTECTED] wrote:
> class Point(object):
> def _init_(self, x, y):
The name of the __init__ method needs *two* underscores
at each end, i.e.
def __init__(self, x, y):
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 5, 6:33 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Feb 5, 3:29 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>
> >>[EMAIL PROTECTED] wrote:
>
> >>>Hello,
> >>> I am very knew to python and am attempting to write a program
> >>>in python that a friend of
[EMAIL PROTECTED] wrote:
> On Feb 5, 3:29 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>
>>[EMAIL PROTECTED] wrote:
>>
>>>Hello,
>>> I am very knew to python and am attempting to write a program
>>>in python that a friend of mine is having to write in java. I am doing
>>>this for fun and woul
On Feb 5, 3:29 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Hello,
> >I am very knew to python and am attempting to write a program
> > in python that a friend of mine is having to write in java. I am doing
> > this for fun and would like some help as to how i
[EMAIL PROTECTED] wrote:
> Hello,
>I am very knew to python and am attempting to write a program
> in python that a friend of mine is having to write in java. I am doing
> this for fun and would like some help as to how i can generate random
> coordinate points (x,y) and compare them with u
[EMAIL PROTECTED] wrote:
> Hello,
>I am very knew to python and am attempting to write a program
> in python that a friend of mine is having to write in java. I am doing
> this for fun and would like some help as to how i can generate random
> coordinate points (x,y) and compare them with u