Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> >>> p1 = Point(3,4) >>> p1.x 3 >>> p1.y 4 >>> p1.z Traceback (most recent call last): File "", line 1, in p1.z AttributeError: 'Point' object has no attribute 'z' >>> p1 <__main__.Point object at 0x00FD7A50> #without __repr__ >>> ================================ RESTART ================================ >>> >>> p1 = Point(3,4) >>> p1 Point(3,4) #with __repr__ >>> ================================ RESTART ================================ >>> >>> p1 Point(0,0) >>> p1.is_origin() True >>> p2.is_origin() False >>> Point.is_origin(p1) True >>> p1 Point(0,0) >>> p2 Point(3,4) >>> p3 Point(3,4) >>> p1==p2 False >>> p3==p2 False #without __eq__ >>> id(p2) 16650576 >>> id(p3) 16650608 >>> ================================ RESTART ================================ >>> >>> p3==p2 #with __eq__ True >>> p1", line 1, in p1>> ================================ RESTART ================================ >>> >>> p1>> ================================ RESTART ================================ >>> >>> p1", line 1, in p1>> p1.__lthan__(p2) True >>>