Carroll, Barry wrote:
> How do I overload the '=' operator to give the desired behavior?

This classic essay talks about the meaning of assignment in Python:
http://www.effbot.org/zone/python-objects.htm

Also I don't think there is any need to overload __lt__, etc.; just 
__cmp__ is enough, it will be used if the others are omitted. Details of 
why you might want to use the "rich" comparison operators are here:
http://www.amk.ca/python/2.1/index.html#SECTION000500000000000000000

Kent



_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to