Skip to content
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

Python: no way to target type of exception in except block #2698

Open
pokey opened this issue Dec 14, 2024 · 0 comments
Open

Python: no way to target type of exception in except block #2698

pokey opened this issue Dec 14, 2024 · 0 comments
Labels
bug Something isn't working lang-python Issues related to Python programming language support

Comments

@pokey
Copy link
Member

pokey commented Dec 14, 2024

In the following code

try:
    pass
except ValueError:
    pass

There is no way to target ValueError. I would argue for either "type" or "value".

@pokey pokey added bug Something isn't working lang-python Issues related to Python programming language support labels Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lang-python Issues related to Python programming language support
Projects
None yet
Development

No branches or pull requests

1 participant