[Python-Dev] decorate-sort-undecorate

Raymond Hettinger python at rcn.com
Tue Oct 14 05:00:34 EDT 2003


I've got a first draft patch (sans docs and tests) loaded at:
   www.python.org/sf/823292

The argument keywords are: cmpfunc, key, reverse

The patch passes regression tests and a minimal set of basic
functionality tests which need to be expanded considerably.  I'll need
to go back over this one in more detail to check:

* Whether the code was inserted in the right place with respect to the
existing anti-mutation code.

* Is the strategy of decorating in-place too aggressive?  Decoration
consists of *replacing* each value x with (x, key(x)).

* Verify reference counting and error handling.



Raymond Hettinger




More information about the Python-Dev mailing list