New submission from Terry J. Reedy: https://docs.python.org/3.4/library/functools.html#functools.cmp_to_key says " A key function is a callable that accepts one argument and returns another value indicating the position in the desired collation sequence." A python list poster (Veek M) 'value indicating the position' as meaning 0, 1, 2, ... and I would read it that way if I did not know better.
Entries for min() and max() say "The key argument specifies a one-argument ordering function like that used for list.sort()." This would be reused here. We also, now, have a Glossary entry for 'key function'. This could be referred to instead. ---------- assignee: docs@python components: Documentation messages: 230895 nosy: docs@python, terry.reedy priority: normal severity: normal stage: needs patch status: open title: functools.cmp_to_key: misleading key function description type: behavior versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22830> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com