[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

METAL XXX report at bugs.python.org
Wed Mar 31 21:14:29 CEST 2010


METAL XXX <metal29a at gmail.com> added the comment:

Sorry I ripped the code from a mess and I forget the tree is "leaflized" as

tree = {
  'A': set(['B', 'C', 'D', 'E']),
  'B': set(['D', 'E']), 
  'C': set(),
  'D': set(),
  'E': set(),
}

I don't want to talk about the actual problem. I think sometime 
it's hard to give an "absolute" weight value as key, for this example,
is the relationship in graph. Then user have to "Copy and paste the recipe" to get a cmp function which should be already there. We are
all adults here, why don't SIMPLELY tell the newbie don't use cmp() use key() unless you know what you are doing.


Thanks for reply.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1771>
_______________________________________


More information about the Python-bugs-list mailing list