-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-124058: remove _PyCompile_IsNestedScope, roll it into _PyCompile_IsInteractive #124061
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
Conversation
This doesn't work correctly if there are multiple statements in one interactive. |
I don't get it:
how come the 1 is not printed? |
This does print the 1:
so at the prompt we're doing something else. |
This reverts commit cebdf71.
…pile_IsInteractive
Python/compile.c
Outdated
@@ -1205,16 +1205,11 @@ _PyCompile_OptimizationLevel(compiler *c) | |||
|
|||
int | |||
_PyCompile_IsInteractive(compiler *c) |
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.
What do you think about renaming this to something like _PyCompile_IsInteractiveTopLevel
for clarity?
…pile_IsInteractive (python#124061)
Fixes #124058.
_PyCompile_IsNestedScope
roll it into_PyCompile_IsInteractive
#124058