Point Object
Soviut
ian at neustyle.com
Sun Jan 6 05:13:40 EST 2008
On Jan 5, 6:37 am, "pjmu... at googlemail.com" <pjmu... at googlemail.com>
wrote:
> I am nes to python and need some help. Can anyone lead me in the
> right direction to 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.
>
> Any help woul be much appreciated.
>
> Pete
You shouldn't have to compare the hex IDs. Just a simple comparison
operator will work:
firstPoint = Point()
secondPoint = Point()
print(firstPoint == secondPoint)
result: True
More information about the Python-list
mailing list