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
semicolon doen't suppress output with ast_node_interactivity="all" #11501
Comments
I did have a look at this and I think that output suppression is "broken" in general when multiline input is involved and not just in Issues #2493 and #6130 are probably related. Until this is fixed, a fix to the docs would not be bad idea. RationaleIMHO BreakdownThe relevant function for output suppression is quiet(). To help debug this issue, I added a Disclaimer: The "expected outputs" of the following test cases showcase how I would expect this to work; you don't necessarily have to agree with this. 1st test casea = 1
b = 2
a # out1
a; # out2
b # out3 Expected output:
2nd test casea = 1
b = 2
a # out1
a # out2
b; # out3 Expected output:
|
It would be useful to get clarity on what the expected behaviour is. My preference would be, especially with |
I think the behavior is "best effort", if we find a better implementation that we'll be happy to get it. |
In an ipython terminal with
c.InteractiveShell.ast_node_interactivity="all"
, the following codewill output
if
-block, the output is suppressed.c.InteractiveShell.ast_node_interactivity="last_expr"
, the output is suppressed.The text was updated successfully, but these errors were encountered: