-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Minor information-ordering issue in __main__ doc #90437
Comments
The expanded documentation on top-level environments is quite an improvement, but there's one passage that causes some confusion. In the section '__main__.py in Python Packages', towards the end, it reads: """ Problem is, that's the first mention of venv anywhere in the document. There's a 'See also:' box right BELOW the sentence in question that references venv and its minimal __main__.py, but it hasn't been introduced yet when that first mention comes along. |
Do you have a suggestion on how to fix this? |
It seems this is a simple miswording, where the word 'above' is used when the see below example clarifies BELOW the text. I will create a pull request within the hour |
Updating issue, Have submitted fix |
TBH, personally I don't think I'd just reword it with "below". That seems like the path of least resistance, but then the sentence becomes this: """ Doesn't really track. How can you draw conclusions ("Hence...") from something that hasn't even been discussed yet? It might actually be better to just drop the mention of venv from that particular sentence. The see-also text introduces *itself* as an example of what was just discussed. There's no real reason to bring it up ahead of time, because the see-also already flows naturally from the previous discussion without any setup. |
I agree that it seems better to avoid menntioning venv in that sentence. Specifically I suggest: This won’t work for __main__.py files in the root directory of a .zip file though. Hence, for consistency, minimal __main__.py without a __name__ check are preferred. |
Maybe, """ (And then the see-also opens, "See venv for an example of a package with a minimal __main__.py in the standard library." which is a natural extension of the discussion.) @taleinat's suggestion works as well (crossed streams). |
Have updated the PR to be in line with the issues leading ideas, specifically Tal's suggestion. Thanks |
Readding Tal to the nosy list, since my previous comment was inadvertently accompanied by an eviction! (Sorry about that.) |
@ferdnyc Excuse me, but are you still following up this issue and PR? I tried to review your PR, and post some comments. |
can anyone check my PR? |
Co-authored-by: Éric <[email protected]> Co-authored-by: Frank Dana <[email protected]>
(cherry picked from commit cb688ba) Co-authored-by: Ali Tavallaie <[email protected]> Co-authored-by: Éric <[email protected]> Co-authored-by: Frank Dana <[email protected]>
(cherry picked from commit cb688ba) Co-authored-by: Ali Tavallaie <[email protected]> Co-authored-by: Éric <[email protected]> Co-authored-by: Frank Dana <[email protected]>
…H-121386) gh-90437: Fix __main__.py documentation wording (GH-116309) (cherry picked from commit cb688ba) Co-authored-by: Ali Tavallaie <[email protected]> Co-authored-by: Éric <[email protected]> Co-authored-by: Frank Dana <[email protected]>
…121385) gh-90437: Fix __main__.py documentation wording (GH-116309) (cherry picked from commit cb688ba) Co-authored-by: Ali Tavallaie <[email protected]> Co-authored-by: Éric <[email protected]> Co-authored-by: Frank Dana <[email protected]>
Co-authored-by: Éric <[email protected]> Co-authored-by: Frank Dana <[email protected]>
Co-authored-by: Éric <[email protected]> Co-authored-by: Frank Dana <[email protected]>
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
The text was updated successfully, but these errors were encountered: