<div dir="ltr">On Thu, Oct 16, 2008 at 6:54 PM, Dillon Collins <span dir="ltr"><<a href="mailto:dillonco@comcast.net">dillonco@comcast.net</a>></span> wrote:<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Thursday 16 October 2008, Greg Ewing wrote:<br>
> It still bothers me that there is no longer a way to<br>
> provide a single method that performs a three-way<br>
> comparison. Not only because total ordering is the<br>
> most common case, but because it makes comparing<br>
> sequences for ordering very inefficient -- you end up<br>
> comparing everything twice, once for < and once for =.<br>
<br>
</div>As a note, you can always implement <= as well, thereby reducing the overhead<br>
of the 'unimplemented' operations to simply negating their complement.  I do<br>
this whenever == and < share non-trivial code.</blockquote><div><br>How does this help ? If the result of "<=" is True, you still have to differentiate between < and == to know whether to stop or proceed with the next element in the sequence.<br>
<br>George<br></div></div><br></div>