Overloading the comparison operator

Jim Fulton (jfulton@dsdbqvarsa.er.usgs.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
something planned?
--
-- Jim Fulton      jfulton@dis2qvarsa.er.usgs.gov    (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.