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 = x
self.y = y
P=(Point)
a=0
b=0
a=id(P)
print a
print b
print P
But now id is a decimal so I don't can't translate it.
Did I something wrong ?
Roelof
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor