Skip to content

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

Open
@pokey

Description

@pokey

In the following code

try:
    pass
except ValueError:
    pass

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglang-pythonIssues related to Python programming language support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions