[issue1717] Get rid of more refercenes to __cmp__
Brett Cannon
report at bugs.python.org
Sun Dec 7 22:30:30 CET 2008
Brett Cannon <brett at python.org> added the comment:
On Sun, Dec 7, 2008 at 13:26, Mark Dickinson <report at bugs.python.org> wrote:
>
> Mark Dickinson <dickinsm at gmail.com> added the comment:
>
> About unittest:
>
> unittest.TestLoader has an attribute "sortTestMethodsUsing", which it
> expects to be an old-style comparison.
>
> Should this attribute be updated (and renamed?) to expect a key function
> instead, or left as is?
>
It will break backwards-compatibility if you change it. Possibly the
best solution is to introduce a new attribute that does either key or
just lt comparison and make sortTestMethodsUsing be a descriptor that
wraps the function as needed.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1717>
_______________________________________
More information about the Python-bugs-list
mailing list