-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
gh-134939: Add a Multiple Interpreters Howto Doc #136143
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
Open
ericsnowcurrently
wants to merge
23
commits into
python:main
Choose a base branch
from
ericsnowcurrently:multiple-interpreters-howto
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
96e1e78
Add the multiple interpreters howto doc.
ericsnowcurrently e5e980e
Drop extraneous changes.
ericsnowcurrently 2fcaedd
Finish howto doc, minus recipes.
ericsnowcurrently aea8278
Add a TODO list.
ericsnowcurrently 4bb1e2f
Drop the execcomponents ref.
ericsnowcurrently d1ab402
Fix a ref.
ericsnowcurrently 1c2d40f
Drop the examples section for now.
ericsnowcurrently ade2ce3
Fix typos.
ericsnowcurrently 40f50e7
Add a misc section to the tutorial.
ericsnowcurrently 0c3105b
Clarify about prepare_main().
ericsnowcurrently 6028349
Fix a pseudo-ref.
ericsnowcurrently d7a7cf0
Fix the examples.
ericsnowcurrently fb13944
Tweak one example.
ericsnowcurrently 72e46fb
Add a ref.
ericsnowcurrently 675246d
Clarify about Interpreter.exec().
ericsnowcurrently 22e3ee0
Clarify about calling different kinds of function.
ericsnowcurrently f7661da
Clarify a note.
ericsnowcurrently 28f0218
Add a caveat about -c and the REPL.
ericsnowcurrently 1b79755
Add a pro tip.
ericsnowcurrently b75c380
Add run-examples.py and fix some of the examples.
ericsnowcurrently 35101a0
Do not try reformatting run-examples.py.
ericsnowcurrently ddae34c
Fix some of the examples.
ericsnowcurrently 652abd3
Do not lint run-examples.py.
ericsnowcurrently 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
Add a caveat about -c and the REPL.
- Loading branch information
commit 28f0218c39f46bd8563532523a0c1639fc10e7fd
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -420,6 +420,12 @@ executed with :data:`!__name__` set to something other than | |||||||||
| put it in the if block. You will probably only want functions or | ||||||||||
| classes outside the if block. | ||||||||||
|
|
||||||||||
| Another thing to keep in mind is that, when you run the REPL or run | ||||||||||
| ``python -c ...``, the code that runs is essentially unrecoverable. The | ||||||||||
| contents of the :mod:`__main__` module cannot be reproduced by executing | ||||||||||
| a script (or module) file. Consequently, calling a function defined | ||||||||||
| in :mod:`__main__` in these cases will probably fail. | ||||||||||
|
|
||||||||||
| Calling Methods and Other Objects in an Interpreter | ||||||||||
| --------------------------------------------------- | ||||||||||
|
Comment on lines
+441
to
+442
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
|
||||||||||
|
|
||||||||||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.