Title: Document necesities for cmp argument of sorted
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 2.7
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: BTaskaya, docs@python, josh.r, krichter
Priority: normal Keywords:

Created on 2016-01-04 23:32 by krichter, last changed 2019-11-16 00:53 by serhiy.storchaka. This issue is now closed.

Messages (3)
msg257505 - (view) Author: Karl Richter (krichter) Date: 2016-01-04 23:32
The docstring of `sorted` doesn't explain what can be passed to the `cmp` and `key` argument of `sorted`.
msg257515 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2016-01-05 05:15
The docstring doesn't give details, but many docstrings don't. The docs themselves do; not sure it's a good idea to expand every docstring into complete documentation; if you don't know the function you read the real docs, the docstrings are useful as a reminder for stuff like argument order and names, higher logic, etc., without getting into details.

cmp is almost certainly not going to be documented further in the docstrings; 2.7 is in bug fix only mode IIRC (and even then, mostly security fix only), and tweaking docstrings that aren't wrong, just less detailed than you might like isn't likely to meet the bar.
msg356731 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python triager) Date: 2019-11-16 00:02
I agree with @josh.r, also for the key (and reverse), they are documented in py3.8. IMHO this issue can be resolved as not a bug.
Date User Action Args
2019-11-16 00:53:38serhiy.storchakasetstatus: open -> closed
resolution: not a bug
stage: resolved
2019-11-16 00:02:48BTaskayasetnosy: + BTaskaya
messages: + msg356731
2016-01-05 05:15:49josh.rsetnosy: + josh.r
messages: + msg257515
2016-01-04 23:32:19krichtercreate