-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Uninformative syntax errors from codeop._maybe_compile (IDLE Shell) #111366
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
Comments
cc @pablogsal |
…odeop module functions
…odeop module functions
…n the codeop module functions
…n the codeop module functions (pythonGH-111384). (cherry picked from commit cd6e0a0) Co-authored-by: Pablo Galindo Salgado <[email protected]>
…n the codeop module functions (pythonGH-111384). (cherry picked from commit cd6e0a0) Co-authored-by: Pablo Galindo Salgado <[email protected]>
…sages in the codeop module functions (pythonGH-111384). (cherry picked from commit cd6e0a0)
…sages in the codeop module functions (pythonGH-111384). (cherry picked from commit cd6e0a0)
…n the codeop module functions (pythonGH-111384). (cherry picked from commit cd6e0a0) Co-authored-by: Pablo Galindo Salgado <[email protected]>
…odeop module functions (python#111384)
Closing as the PRs have been merged. Thanks for the report! |
Either f:\dev\3x>python
# REPL splash lines
>>> def f(x,x): pass
...
SyntaxError: duplicate argument 'x' in function definition
# Switch to simulated REPL, also used by IDLE, with same result.
>>> import code
>>> code.interact()
(InteractiveConsole)
>>> def f(x,x): pass
File "<console>", line 1
def f(x,x): pass
SyntaxError: invalid syntax
# Improvement over "incomplete input" in released versions (at least in IDLE), but not best.
>>> def f(x,x):
... pass
File "<console>", line 1
SyntaxError: duplicate argument 'x' in function definition |
I still think that the fix for ._maybe_compile is to expose the REPL logic disintangled from terminal interaction, much as Python tokening code in |
(Feel free to reopen this issue if needed) |
…odeop module functions (python#111384)
…odeop module functions (python#111384)
Linked PRs
The text was updated successfully, but these errors were encountered: