Skip to content

feature: Python: support new syntax except* #302

@sohang3112

Description

@sohang3112

Did you check the tree-sitter docs?

Is your feature request related to a problem? Please describe.

PEP 654 introduced exception groups: "a combination of multiple unrelated exceptions". This changes how exceptions are handled by the user, where a new variation of the except keyword can be used as except*.

However, code block syntax highlighting does not support it yet, removing the coloring even from the except keyword itself:

try:
    raise ExceptionGroup()
except*:
    pass

This issue was originally raised in markup repo, moved here as it's about syntax highlighting: github/markup#1942

Describe the solution you'd like

Suppory syntax highlighting for new keyword except*.

Describe alternatives you've considered

NA

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions