PyDocs

Nav

Python Language Services

TryStar

ast

class · Added in 3.11
  • TryStar(body, handlers, orelse, finalbody)
TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)
1 Example
>>> print(ast.dump(ast.parse("""
... try:
...    ...
... except* Exception:
...    ...
... """), indent=4))
Module(
    body=[
        TryStar(
            body=[
                Expr(
                    value=Constant(value=Ellipsis))],
            handlers=[
                ExceptHandler(
                    type=Name(id='Exception'),
                    body=[
                        Expr(
                            value=Constant(value=Ellipsis))])])])
from the Python docs
See Also
No see-alsos for ast/TryStar
0 Notes
No notes for TryStar