Skip to content

bpo-39452: Improve the __main__ module documentation #14487

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

Closed
wants to merge 5 commits into from

Conversation

geryogam
Copy link
Contributor

@geryogam geryogam commented Jun 30, 2019

This PR will apply the following changes on the __main__ module documentation:

  • replace an incorrect use of "script" with "code";
  • replace incorrect and inconsistent uses of "scope" with "environment";
  • add missing cases where the __main__ module is also initialized (when using the -c and -m arguments);
  • replace the ambiguous "when it is imported" by "not initialized from an import statement" since using a -m argument also performs import for instance;
  • add missing cases for the conditional execution of the if body (all the cases when the module is not initialized from an import statement);
  • make the if block comment PEP 8-compliant (capital initialised, period ended);
  • add a missing case for the conditional execution of the __main__.py submodule of a package (when the package is initialized from a file argument).

https://bugs.python.org/issue39452

@geryogam geryogam marked this pull request as ready for review June 30, 2019 17:24
Copy link
Contributor

@mangrisano mangrisano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@geryogam geryogam changed the title Update __main__.rst Update the __main__ module documentation Aug 7, 2019
@geryogam geryogam changed the title Update the __main__ module documentation Improve the __main__ module documentation Aug 7, 2019
@mariatta-bot
Copy link

🤖 Mariatta was mentioned, but she's out of open source until end of September 2019. Hopefully someone else can look into this in the meantime.

@csabella
Copy link
Contributor

@maggyero, please open a bug tracker ticket for this. That will provide the chance for more people to see the change and comment on it. Thanks!

@geryogam geryogam changed the title Improve the __main__ module documentation bpo-39452: Improve the __main__ module documentation Jan 25, 2020
@geryogam
Copy link
Contributor Author

Done @csabella.

Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, at least the first two changes in the description are wrong. See the issue for discussion.

@bedevere-bot
Copy link

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@geryogam
Copy link
Contributor Author

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@terryjreedy: please review the changes made to this pull request.

@terryjreedy
Copy link
Member

Remove trailing whitespace with patchcheck, as mentioned in devguide.

@terryjreedy
Copy link
Member

@stevendaprano Changes were made in response to your review on the issue.

@geryogam
Copy link
Contributor Author

@terryjreedy

Remove trailing whitespace with patchcheck, as mentioned in devguide.

Done.

@ambv
Copy link
Contributor

ambv commented Aug 24, 2021

Closing in favor of GH-26883.

@ambv ambv closed this Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting change review docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants