[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
**Subject**: **Re: Inconsistency in __eq, __lt, __le**
**From**: Rebel Neurofog <rebelneurofog@...>
**Date**: Tue, 29 Mar 2011 19:38:19 +0400

> So, I'd either prefer the same shortcut to be added for __lt and __le, or
> the shortcut be removed from __eq.
> At the very least, it would be nice with some sort of explanation on why the
> shortcut for __eq was added in the first place.
Easy to guess:
for complex objects (e. g., 4096x4096 matrices) one operation is
better than two.
On the other hand, 'not' operation isn't very expensive.
Just imagine if we try to expand
matrix_a <= matrix_b
into
((matrix_a < matrix_b) or (matrix_a == matrix_b))