Skip to content

Add SyntaxError check for pdb's command display #103023

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

Closed
gaogaotiantian opened this issue Mar 25, 2023 · 1 comment
Closed

Add SyntaxError check for pdb's command display #103023

gaogaotiantian opened this issue Mar 25, 2023 · 1 comment
Labels
type-feature A feature request or enhancement

Comments

@gaogaotiantian
Copy link
Member

gaogaotiantian commented Mar 25, 2023

Feature or enhancement

Check SyntaxError when doing display in pdb.

Pitch

display adds an expression to watch list. However, if there's a syntax error, then the command is meaningless. Currently, display still adds this invalid expression into the watch list, which does not make sense in almost all cases. Adding a syntax error check could prevent the users from accidentally adding wrong expressions then having to remove it with undisplay.

Linked PRs

@ambv
Copy link
Contributor

ambv commented Mar 27, 2023

That's a reasonable improvement, thanks for taking the time to report and implement this!

@ambv ambv closed this as completed Mar 27, 2023
ambv added a commit to gaogaotiantian/cpython that referenced this issue Mar 28, 2023
warsaw pushed a commit to warsaw/cpython that referenced this issue Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants