-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-39452: rewrite and expand __main__.rst #26883
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
02e9edf
__main__docs: intro and first secton
jdevries3133 c95f69b
bpo-44494: rewrite of Doc/library/__main__.rst (first draft)
jdevries3133 235e866
bpo-44494: add blurb
jdevries3133 a292ab6
Update __main__.rst
geryogam d7a1999
Update __main__.rst
geryogam 8398f08
Take Steven d’Aprano’s review into account
geryogam 1fcb2af
Rewrap lines
geryogam 2bde063
Remove trailing whitespaces
geryogam d29fd2a
bpo-39452: rewrite and expansion of __main__.rst
jdevries3133 4c60f2c
mention runpy
jdevries3133 2b5f710
add "design patterns" section, fix section title hierarchies
jdevries3133 7e495d7
add sentence about console_scripts
jdevries3133 56afeaa
misc formatting; change "Design Patterns" to "Idiomatic Usage"
jdevries3133 2a398ef
add section about sys.exit(main()) convention
jdevries3133 1a9956c
make last paragraph 'idiomatic usage'; add comment about maybe deleting
jdevries3133 c4b5cea
fix linting error (default context used in comment)
jdevries3133 1f012b4
revise example so that main() does not take arguments
jdevries3133 f095362
add console_scripts section, remove bad old example
jdevries3133 c42b706
minor proofreading changes
jdevries3133 7fe7f1c
implement changes suggest by @merwok
jdevries3133 c063da1
fix: typos
jdevries3133 7c6b451
fix wording, slim down example, add reference to relative import docs
jdevries3133 06bcb09
respond to review from @pradyunsg
jdevries3133 80756b3
Merge remote-tracking branch 'upstream/main' into bpo-39452__main__docs
jdevries3133 647c471
add `import __main__` section
jdevries3133 457bbc9
revisions and proofreading
jdevries3133 3d9b3b9
eliminate opinionated section about idiomatic usage of `__main__.py`
jdevries3133 dd68513
proofread `__main__.py` section
jdevries3133 6ee7090
Merge branch 'main' of github.com:python/cpython into bpo-39452__main…
jdevries3133 757b03a
incorporate suggested changes from @Fidget-Spinner
jdevries3133 8e86468
incorporate suggested changes from @yaseppochi
jdevries3133 f33a081
fix formatting
jdevries3133 14bad85
name equals main
jdevries3133 d150674
Merge branch 'main' of github.com:python/cpython into bpo-39452__main…
jdevries3133 7b987cb
Merge branch 'bpo-39452__main__docs' of github.com:jdevries3133/cpyth…
jdevries3133 b9db705
also change reference to name equals main section
jdevries3133 168c774
implement feedback from @holdenweb, python-dev, and @merwork
jdevries3133 c450171
fix trailing whitespace
jdevries3133 077e7a4
Remove .bak file
ambv eb42489
Thorough editing pass
ambv 7c61e78
Move `__main__.py` section above the `import __main__` section
ambv 45a9425
s/command line/command-line/
ambv 073e9d7
Mention asyncio.__main__
ambv ccb9004
Restore proper document name
ambv f8630fa
Use proper .. seealso:: sections.
ambv 1e86e02
Appease `make suspicious`
ambv 9c87442
Spell out examples of top-level code environments
ambv 0d4fc8a
Appease double dot alignment aesthetics
ambv 4e51333
Replace lies with truth
ambv 6f0f82c
Improve flow introducing what "top-level code environment" is
ambv 46e7668
Use module names consistently in example
ambv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.