This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年05月25日 12:36 by jgehrcke, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| sort_tut.diff | rhettinger, 2014年05月26日 01:45 | Minor tutorial edit | review | |
| sort_tut_02.diff | jgehrcke, 2014年05月26日 08:15 | Refer to sorted() built-in. | review | |
| Messages (6) | |||
|---|---|---|---|
| msg219085 - (view) | Author: Dr. Jan-Philip Gehrcke (jgehrcke) * | Date: 2014年05月25日 12:36 | |
Currently, the tutorial for the list sort method does not show allowed arguments: list.sort() Sort the items of the list in place. (see e.g. https://docs.python.org/3.4/tutorial/datastructures.html) Is there a reason why we do not show the arguments there? For simplicity? One should note that a web search for Python's list methods ranks that page pretty high. We could list the defaults, as in the built-in help: L.sort(cmp=None, key=None, reverse=False) And could link to https://docs.python.org/2/library/functions.html#sorted for an explanation. |
|||
| msg219100 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2014年05月25日 19:08 | |
I assume it is on purpose that the tutorial does not show all methods with all their arguments. It could overwhelm readers with too much information, and would also duplicate the full doc that’s in the reference. A link from this tutorial page to the list reference (and maybe the sorting howto) could be a good addition. |
|||
| msg219120 - (view) | Author: Raymond Hettinger (rhettinger) * (Python committer) | Date: 2014年05月26日 01:41 | |
> Is there a reason why we do not show the arguments there? It was likely an oversight. I think it should be updated so that people know the options are there. |
|||
| msg219144 - (view) | Author: Dr. Jan-Philip Gehrcke (jgehrcke) * | Date: 2014年05月26日 08:15 | |
I have updated the patch with a cross-reference to the sorted() built-in, which explains the arguments. W.r.t. to Éric's suggestion: the sorted() doc refers to the sorting howto in the wiki. Now everything is connected. |
|||
| msg219192 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年05月27日 01:44 | |
New changeset 1b96949bfc97 by Raymond Hettinger in branch 'default': Issue 21575: Show list.sort() arguments in the tutorial. http://hg.python.org/cpython/rev/1b96949bfc97 |
|||
| msg219194 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年05月27日 01:49 | |
New changeset be77b213ace0 by Raymond Hettinger in branch '2.7': Issue 21575: Show list.sort() arguments in the tutorial. http://hg.python.org/cpython/rev/be77b213ace0 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:04 | admin | set | github: 65774 |
| 2014年06月29日 10:07:59 | ezio.melotti | set | type: enhancement stage: resolved |
| 2014年05月27日 01:50:09 | rhettinger | set | status: open -> closed resolution: fixed |
| 2014年05月27日 01:49:36 | python-dev | set | messages: + msg219194 |
| 2014年05月27日 01:44:12 | python-dev | set | nosy:
+ python-dev messages: + msg219192 |
| 2014年05月26日 08:16:00 | rhettinger | set | assignee: docs@python -> rhettinger |
| 2014年05月26日 08:15:16 | jgehrcke | set | files:
+ sort_tut_02.diff messages: + msg219144 |
| 2014年05月26日 01:45:28 | rhettinger | set | files:
+ sort_tut.diff keywords: + patch |
| 2014年05月26日 01:41:28 | rhettinger | set | nosy:
+ rhettinger messages: + msg219120 |
| 2014年05月25日 19:08:06 | eric.araujo | set | messages: + msg219100 |
| 2014年05月25日 12:36:25 | jgehrcke | create | |