gh-150274: Clarify module.__file__ documentation#150273
gh-150274: Clarify module.__file__ documentation#150273RaghunandanKumar wants to merge 1 commit into
Conversation
Documentation build overview
|
2aea75f to
82666c7
Compare
| For modules loaded from a file by the import system, it is usually an | ||
| absolute path. However, other loaders may set it to a different value, so | ||
| code that needs an absolute path should normalize it explicitly. |
There was a problem hiding this comment.
This does not explain anything. It just says "it can be anything and it depends on the loaders" so it does not help the reader more. This part needs to be removed.
| :attr:`!__file__` is an optional attribute that may or may not be set. | ||
| When it is set, it should be a :class:`str`. |
There was a problem hiding this comment.
Do not change the first sentence, it is correct. Only change the second.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Summary
module.__file__section wording to describe a single optional attributeIssue
Testing
make -C Doc text SOURCES='reference/datamodel.rst' SPHINXOPTS='-q'