Re: [Tutor] class problem

2010-09-18 Thread Steven D'Aprano
On Sat, 18 Sep 2010 07:14:03 pm Roelof Wobben wrote: > P=(Point) This line does not do what you think it does. Brackets in Python are used for two things, grouping and calling functions. To call a function, or a class, you need to have the brackets *after* the function: P = Point() # what ab

Re: [Tutor] class problem

2010-09-18 Thread Alan Gauld
"Roelof Wobben" wrote Create and print a Point object, and then use id to print the object’s unique identifier. Translate the hexadecimal form into decimal and confirm that they match. I initially had no idea what hexadecimal form the text is talking about. id returns a decimal form... T

[Tutor] class problem

2010-09-18 Thread Roelof Wobben
Hello, I have this exercise : Create and print a Point object, and then use id to print the object’s unique identifier. Translate the hexadecimal form into decimal and confirm that they match. So I thought that this would solve it: class Point: def __init__(self, x=0, y=0): self.x