Overloading the comparison operator
Jim Fulton (firstname.lastname@example.org.GOV)
Mon, 23 May 1994 23:30:09 GMT
According to the documentationI have, one overloads == and != by
defining __cmp__ in a class definition. Unfortunately, the is the (to
me) undesirable side effect of also overloading <, <=, >, and >=.
There are (non-magnitude) classes for which one would like to override
==, and !=, but not <, <=, >, and >=. Is there a way to do this? Is
-- Jim Fulton email@example.com (703) 648-5622
U.S. Geological Survey, Reston VA 22092
This message is being posted to obtain or provide technical information
relating to my duties at the U.S. Geological Survey.