From: Eli A. <el...@ce...> - 2001-02-17 19:01:11
|
Hi. I have inherited a jpython application that makes use of user-defined java time series classes. These classes have overloaded operators that do pretty much what you would expect. For instance, given a time series x and a time series y, x+y returns a new time series with the elements of x and y added at corresponding times. It would be very useful to be able to define x>y the same way. However, when I write my own __cmp__ method jpython ignores it. The results from x>y are an arbitrary scalar value, as if I had left comparisons undefined. If I call my method directly by name: x.__cmp__(y) it works fine. Any advice? |