Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-133400: Fixed Ctrl+D (^D) behavior in :mod:_pyrepl
module#133883
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
StanFromIreland commentedMay 11, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This is not ideal: >>>ifTrue:...File"<python-input-2>",line1ifTrue:^IndentationError:expectedanindentedblockafter'if'statementonline1>>> |
This fix is to correctly handle the issue of Ctrl+D to exit multi-line mode. What do you think the expected behavior should be? |
feoh commentedMay 19, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@ambv FWIW I tested this PR on my Mac (main branch, latest, MacOS latest) and it works great. I tried throwing a bunch of other unclosed constructs (e.g. {, [, etc.) and none exhibited this error either. |
@StanFromIreland Are you suggesting that the error message in the if True: case could be more clear? The fact that the user isn't supplying a valid indented block after the if True: is indeed a problem the language needs to flag, so I'm curious what specific wording you think might be more clear. Also it seems to me like this could be a separate Github issue. Do you agree? |
Uh oh!
There was an error while loading.Please reload this page.
Fixed Ctrl+D (^D) behavior in :mod:
_pyrepl
module: