From: Eric Hodel Date: 2005-11-10T03:45:56+09:00 Subject: Re: Numeric <=> On Nov 9, 2005, at 8:47 AM, Robert Klemme wrote: > Christophe Grandsire wrote: >> Selon ChrisH : >> >>> Thanks Eric. I just wonder why Numeric doesn't implement it >>> properly? >> >> Probably because it can't. I'm not completely up-to-date with the >> Numeric inheritance chain, but I guess for instance Complex numbers >> also inherit from Numeric. Being Numeric doesn't necessarily mean >> that there is a meaningful order among the objects. > > Although I agree with your analysis that Numeric can't properly > implement > <=> the question remains why <=> is actually implemented in > Numeric. ATM > I cannot see what necessitates it. Including Comparable is not a > reason > IMHO because that will break either way (i.e. with missing <=> and > with > incomplete implemented <=>). > >> Then again, I'm out on a limb here, and may be completely wrong. > > Not completely but I have the feeling we're still not there. Someone > probably needs to take the time and have a look at the sources... If you forget to define #<=> in your Numeric subclass you have a safety net and your code won't mysteriously die. -- Eric Hodel - drbrain@segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04