MatchStar

class astroid.nodes.MatchStar(lineno: int | None = None, col_offset: int | None = None, parent: NodeNG | None = None, *, end_lineno: int | None = None, end_col_offset: int | None = None)[source]

Bases: AssignTypeNode, Pattern

Class representing a ast.MatchStar node.

>>> import astroid
>>> node = astroid.extract_node('''
... match x:
...     case [1, *_]:
...         ...
... ''')
>>> node.cases[0].pattern.patterns[1]
<MatchStar l.3 at 0x...>
assigned_stmts(**kwargs: _P.kwargs) → Generator[InferenceResult]

Returns the assigned statement (non inferred) according to the assignment type. See astroid/protocols.py for actual implementation.

postinit(*, name: AssignName | None) → None[source]