Was: Is this an Bug in python 2.3?? Reflective relational operators
dieter at handshake.de
Sun Jun 13 20:23:35 CEST 2004
balaji at email.arizona.edu (Balaji) writes on 12 Jun 2004 16:38:07 -0700:
> Thanks for your reply. I see that the PEP and the current docs
> specify that __ge__ and __le__ are their own reflection.
> Automatic reflection prevents the resulting objects from being
> dependant on the ordering of the arguments to __ge__ and __le__. In
> our application, this ordering is important.
? The order of "__ge__" and "__le__" operands is always important -- not
only in your application...
I read the documentation as "__le__" is the reflection of "__ge__" and vice
versa. This seems to be senseful.
> Can anyone think of a way to get around automatic reflection of
> relational operators?
Define the respected operators for both operands. Then, there is no
need for reflection.
More information about the Python-list