MatchValue

class astroid.nodes.MatchValue(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: Pattern

Class representing a ast.MatchValue node.

>>> import astroid
>>> node = astroid.extract_node('''
match x:
    case 200:
        ...
''')
>>> node.cases[0].pattern
<MatchValue l.3 at 0x10c24e200>
postinit(*, value: NodeNG) None[source]