Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

There's no need to guess what it does ;-)  We don't document by experiment when 
source and test suites are available.  

Mathew was correct, it works as documented:  the key function is applied  at 
the outset (as it always does) and then cmp function is used whenever a 
comparison is made (as it always does).  There is no special change in behavior 
when the two are used together; they are effectively orthogonal (the actual 
implementation is a bit more complicated).  IMO, the docs are correct as-is.

There is some question about whether to specifically elaborate on what happens 
when both are used together.  For the most part, users are better-off using 
either key-functions or cmp-functions but not both at the same time.  We may be 
doing them a disservice by suggesting otherwise.  

This has been out for several years now and no one has either noticed or cared, 
so I recommend closing with no change.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11712>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to