[GvR] > Hold on. We went down that road quite a bit and then discovered it > wasn't going to work.
I figured that it was missing for a reason. > The problem is that if you have two instance x, > y such that isinstance(x, TotalOrdering) and isinstance(y, > TotalOrdering) you still don't know if x < y is defined. (For example, > if x is a string and y is a number.) So, ordering only makes sense when "other" is known to be of the same type as "self". > There's a useful definition in there somewhere but > it's elusive. We'll eventually figure it out. I hope so. I'm less interested in the mixin and more interested in a way for a class to have a way to tell you whether it is sortable. Right now, the presence or absence of __le__ doesn't tell you much. Raymond _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
