<div dir="ltr">On Thu, Oct 16, 2008 at 12:07 AM, Terry Reedy <span dir="ltr"><<a href="mailto:tjreedy@udel.edu" target="_blank">tjreedy@udel.edu</a>></span> wrote:<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>Guido van Rossum wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, Oct 15, 2008 at 12:12 PM, Terry Reedy <<a href="mailto:tjreedy@udel.edu" target="_blank">tjreedy@udel.edu</a>> wrote:<br>
</blockquote>
<br>
</div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
interpret the above as saying that we have already done as much as is<br>
sensible (except for changing the docs).<br>
</blockquote>
<br>
I think we've done as much as I am comfortable with doing *by default*<br>
(i.e. when inheriting from object). The rest should be provided via<br>
mix-ins. But even those mix-ins should wait until 3.1.<br>
</blockquote>
<br></div>
After posting and then thinking some more, I came to the same conclusion, that anything more should be by explicit request. </blockquote><div><br>Can you expand on how you reached this conclusion ? For one thing, total orderings are far more common, so that alone is a strong reason to have them by default, even if it made things harder for partial orderings. Even for those though, the current behavior is not necessarily better:<br>
<br>class SetlikeThingie(object):<br> def __init__(self, *items):<br> self.items = set(items)<br> def __eq__(self, other):<br> return self.items == other.items<br> def __ne__(self, other):<br> return self.items != other.items<br>
def __lt__(self, other):<br> return self!=other and self.items.issubset(other.items)<br><br>>>> a = SetlikeThingie(1,2,3)<br>>>> b = SetlikeThingie(2,3,4)<br>>>> assert (a<b or a==b) == (a<=b)<br>
</div></div>AssertionError<br><br>George<br></div>