Issue 25461: Unclear language (the word ineffective) in the documentation for os.walk (original) (raw)

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Bernt.Røskar.Brenna, benjamin.peterson, docs@python, ezio.melotti, jfine2358, luiz.poleto, miss-islington, nanjekyejoannah, python-dev, r.david.murray, vstinner
Priority: normal Keywords: easy, patch

Created on 2015-10-22 17:05 by Bernt.Røskar.Brenna, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
os_walk_docs_change_unclear_language.patch Bernt.Røskar.Brenna,2015-10-23 09:41 Patch for os.rst review
os_walk_docs_change_unclear_language_2.patch Bernt.Røskar.Brenna,2015-10-23 09:46 Correct patch review
os_walk_doc.patch Bernt.Røskar.Brenna,2015-10-23 12:30 Even more correct patch review
issue25461.patch luiz.poleto,2016-04-28 04:36 review
Pull Requests
URL Status Linked Edit
PR 11836 merged python-dev,2019-02-13 08:53
PR 15843 merged miss-islington,2019-09-10 12:44
PR 15844 merged miss-islington,2019-09-10 12:44
Messages (20)
msg253338 - (view) Author: Bernt Røskar Brenna (Bernt.Røskar.Brenna) * Date: 2015-10-22 17:05
At least for me (non-english speaker), the following is confusing: "Modifying dirnames when topdown is False is ineffective, because in bottom-up mode the directories in dirnames are generated before dirpath itself is generated." I suggest to replace "is ineffective" with "has no effect". Ineffective could also mean: "Has low performance", could it not?
msg253339 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2015-10-22 17:10
Thanks for the report. This sounds like a reasonable request to me. Would you like to make a patch? (If so, you can check the devguide.)
msg253340 - (view) Author: Bernt Røskar Brenna (Bernt.Røskar.Brenna) * Date: 2015-10-22 17:15
OK, I'll submit a patch
msg253342 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-10-22 17:31
As an English speaker, I prefer ineffective. Modifying dirnames does have an effect, it modifies dirnames. What it doesn't do (is ineffective at) is thereby altering the behavior of walk. If you want to avoid ineffective because its meaning is subtle (a reasonable request), the correct replacement would be "modifying dirnames has no effect on the behavior of the walk", which is wordier but clearer.
msg253372 - (view) Author: Bernt Røskar Brenna (Bernt.Røskar.Brenna) * Date: 2015-10-23 09:46
I agree your suggestion is better, I did not see it before submitting my first patch. I've added another patch.
msg253375 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-10-23 10:39
New changeset 0286bb18a351 by Victor Stinner in branch '3.4': Issue #25461: Rephrase os.walk() doc https://hg.python.org/cpython/rev/0286bb18a351 New changeset 9f68e41fb4a7 by Victor Stinner in branch '3.5': Merge 3.4 (Issue #25461) https://hg.python.org/cpython/rev/9f68e41fb4a7 New changeset db07937b3e49 by Victor Stinner in branch 'default': Merge 3.4 (Issue #25461) https://hg.python.org/cpython/rev/db07937b3e49
msg253376 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-10-23 10:42
New changeset 8247dff49113 by Victor Stinner in branch '2.7': Issue #25461: Rephrase os.walk() doc https://hg.python.org/cpython/rev/8247dff49113
msg253377 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-10-23 10:51
> If you want to avoid ineffective because its meaning is subtle (a reasonable request), the correct replacement would be "modifying dirnames has no effect on the behavior of the walk", which is wordier but clearer. I prefer the new sentence, it's more explicit. Maybe I pushed the change too fast. @David: are you ok with the change?
msg253379 - (view) Author: Bernt Røskar Brenna (Bernt.Røskar.Brenna) * Date: 2015-10-23 12:30
Yet another patch, this time including changes to os.walk()'s docstring as well. Ignore the two other files.
msg253380 - (view) Author: Bernt Røskar Brenna (Bernt.Røskar.Brenna) * Date: 2015-10-23 13:04
A question/comment: In this case (and there are probably other cases like it) - it seems to me that the docstring (in os.py) and the docs (in os.rst) are similar enough that the docstring from the code could be included in the docs (using Sphinx's autodoc). What is the preferred way? Is there a reason to have it the way it is? I notice the .rst docs have some formatting applied, is it considered not OK to put formatting in docstrings?
msg253381 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-10-23 13:07
We don't use autodoc. It would be "nice" to have a tool to update .rst files from .py and .c files, but it's not the case right now :-/
msg253382 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2015-10-23 13:10
Usually docstrings are short and to the point, and serve more as a remainder, whereas the online docs explain everything in detail. Also rst markup in docstrings would be distractings, so we keep docstrings and online docs separated, even though there is often some overlapping.
msg253383 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-10-23 13:15
"Also rst markup in docstrings would be distractings, so we keep docstrings and online docs separated, even though there is often some overlapping." Ah yes, and the doc in Doc/ directory contains more information like ".. versionchanged:: (...)", ".. versionadded:: (...)", links to other doc using reST markups, etc. In general, the doc in Doc/ is higher quality than docstrings ;)
msg263869 - (view) Author: Luiz Poleto (luiz.poleto) * Date: 2016-04-21 02:50
The Doc/library/os.rst bit in the current patch fails to apply in all versions specified in this bug report (it seems that it was generated before the commit that included an earlier version of it).
msg264410 - (view) Author: Luiz Poleto (luiz.poleto) * Date: 2016-04-28 04:36
The change to os.rst is already committed so I modified the patch to remove it and keep only the change to os.py, which looks good and ready to be committed.
msg335289 - (view) Author: Joannah Nanjekye (nanjekyejoannah) * (Python committer) Date: 2019-02-12 06:52
What is the status on this? From this discussion, it looks like @vstinner pushed changes to resolve this. Do we close this? If this still needs a patch, then one of the patches can be reviewed in a PR on GitHub.
msg335301 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-02-12 13:01
> What is the status on this? From this discussion, it looks like @vstinner pushed changes to resolve this. Do we close this? If this still needs a patch, then one of the patches can be reviewed in a PR on GitHub. It seems like os_walk_doc.patch and .patch have been written after I pushed my changes. Would you be interested to convert these patches into a proper PR?
msg351629 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2019-09-10 12:44
New changeset 734f1202a50641eb2c4bfbcd5b75247c1dc99a8f by Benjamin Peterson (Bernt Røskar Brenna) in branch 'master': closes bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836) https://github.com/python/cpython/commit/734f1202a50641eb2c4bfbcd5b75247c1dc99a8f
msg351646 - (view) Author: miss-islington (miss-islington) Date: 2019-09-10 13:22
New changeset c43f26eca35f22707a52fb8f3fbfc9340639b58d by Miss Islington (bot) in branch '3.8': closes bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836) https://github.com/python/cpython/commit/c43f26eca35f22707a52fb8f3fbfc9340639b58d
msg351656 - (view) Author: miss-islington (miss-islington) Date: 2019-09-10 13:34
New changeset d94b762ce824e97c441f9231f0e69ef8f59beeab by Miss Islington (bot) in branch '3.7': closes bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836) https://github.com/python/cpython/commit/d94b762ce824e97c441f9231f0e69ef8f59beeab
History
Date User Action Args
2022-04-11 14:58:23 admin set github: 69647
2019-09-10 13:34:06 miss-islington set messages: +
2019-09-10 13:22:00 miss-islington set nosy: + miss-islingtonmessages: +
2019-09-10 12:44:15 miss-islington set pull_requests: + <pull%5Frequest15490>
2019-09-10 12:44:09 miss-islington set pull_requests: + <pull%5Frequest15489>
2019-09-10 12:44:01 benjamin.peterson set status: open -> closednosy: + benjamin.petersonmessages: + resolution: fixedstage: patch review -> resolved
2019-02-13 08:53:27 python-dev set pull_requests: + <pull%5Frequest11867>
2019-02-12 13:01:27 vstinner set messages: +
2019-02-12 06:52:09 nanjekyejoannah set nosy: + nanjekyejoannahmessages: +
2018-07-26 19:51:30 jfine2358 set nosy: + jfine2358
2016-04-28 04:36:54 luiz.poleto set files: + issue25461.patchmessages: +
2016-04-21 02:50:13 luiz.poleto set nosy: + luiz.poletomessages: +
2016-01-01 03:54:43 ezio.melotti set stage: needs patch -> patch review
2015-10-23 13:15:30 vstinner set messages: +
2015-10-23 13:10:57 ezio.melotti set messages: +
2015-10-23 13:07:45 vstinner set messages: +
2015-10-23 13:04:33 Bernt.Røskar.Brenna set messages: +
2015-10-23 12:30:33 Bernt.Røskar.Brenna set files: + os_walk_doc.patchmessages: +
2015-10-23 10:51:12 vstinner set messages: +
2015-10-23 10:42:55 python-dev set messages: +
2015-10-23 10:39:32 python-dev set nosy: + python-devmessages: +
2015-10-23 10:15:21 vstinner set nosy: + vstinner
2015-10-23 09:46:39 Bernt.Røskar.Brenna set files: + os_walk_docs_change_unclear_language_2.patchmessages: +
2015-10-23 09:41:47 Bernt.Røskar.Brenna set files: + os_walk_docs_change_unclear_language.patchkeywords: + patch
2015-10-22 17:31:03 r.david.murray set nosy: + r.david.murraymessages: +
2015-10-22 17:15:39 Bernt.Røskar.Brenna set messages: +
2015-10-22 17:10:01 ezio.melotti set versions: + Python 3.4, Python 3.6nosy: + ezio.melottimessages: + keywords: + easystage: needs patch
2015-10-22 17:05:38 Bernt.Røskar.Brenna create