[Python-ideas] Automatic total ordering
tjreedy at udel.edu
Thu Oct 16 06:07:01 CEST 2008
Guido van Rossum wrote:
> On Wed, Oct 15, 2008 at 12:12 PM, Terry Reedy <tjreedy at udel.edu> wrote:
>> interpret the above as saying that we have already done as much as is
>> sensible (except for changing the docs).
> I think we've done as much as I am comfortable with doing *by default*
> (i.e. when inheriting from object). The rest should be provided via
> mix-ins. But even those mix-ins should wait until 3.1.
After posting and then thinking some more, I came to the same
conclusion, that anything more should be by explicit request. Document
the imported tool well and the results are the programmer's responsibility.
>> There are several possible basis pairs of defined operations. A
>> specification must list which one(s) would work.
> There could be several different mix-ins that implement a total
> ordering based on different basis pairs. (Or even a single basis
> operation -- *in principle* all you need is a '<' operation.)
Raymond's idea of an intelligent (adaptive) decorator (or two?) sounds
pretty good too.
More information about the Python-ideas