fst.match

Structural node pattern matching. Uses AST-like and even AST nodes themselves for patterns. Ellipsis is used in patterns as a wildcard and several extra functional pattern types are provided for setting tags, regex string matching, logic operations, match check callbacks, match previously matched nodes (backreference) and greedy and non-greedy quantifiers.

In the examples here you will see AST nodes used interchangeably with their MAST pattern counterparts. For the most part this is fine and there are only a few small differences between using the two. Except if you are using a type checker...

Note: Annoyingly this module breaks the convention that anything that has FST class methods imported into the main FST class has a filename that starts with fst_. This is so that from fst.match import * and from fst import match as m is cleaner.

class MatchError(builtins.RuntimeError):

An error during matching or substitution.

NotSet = <NotSet>

A falsey object returned if accessing a non-existent tag on the FSTMatch object as an attribute.

class FSTMatch:

Successful match object.

FSTMatch( pattern: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType], matched: Union[fst.fst.FST, fst.view.FSTView, ast.AST, ellipsis, int, float, complex, str, bytes, bool, NoneType, list[ast.AST | ellipsis | int | float | complex | str | bytes | bool | None]], tags: Mapping[str, Any])
tags: Mapping[str, Any]

Full match tags dictionary. Only successful matches get their tags included.

pattern: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]

The pattern used for the match. Can be any valid pattern including AST node, primitive values, compiled re.Pattern, etc...

matched: Union[fst.fst.FST, fst.view.FSTView, ast.AST, ellipsis, int, float, complex, str, bytes, bool, NoneType, list[ast.AST | ellipsis | int | float | complex | str | bytes | bool | None]]

What was matched. Does not have to be a node as list and primitive matches can be matched. If a node is matched then this will be AST or FST depending on which type the target of the match attempt was.

def get(self, tag: str, default: object = <NotSet>, /) -> object:

A dict.get() function for the match tags. Just a shortcut for FSTMatch.tags.get(tag, default).

class M_Pattern:

The base class for all non-primitive match patterns. The two main categories of patterns being MAST node matchers and the functional matchers like MOR and MRE.

def match( self, target: Union[fst.fst.FST, fst.view.FSTView, ast.AST, ellipsis, int, float, complex, str, bytes, bool, NoneType, list[ast.AST | ellipsis | int | float | complex | str | bytes | bool | None]], *, ctx: bool = False) -> FSTMatch | None:

Match this pattern against given target. This can take FST nodes or AST (whether they are part of an FST tree or not, meaning it can match against pure AST trees). Can also match primitives and lists of nodes if the pattern is set up for that.

Parameters:

  • target: The target to match. Can be an AST or FST node or constant or a list of AST nodes or constants.
  • ctx: Whether to match expr_context INSTANCES or not (expr_context types are always matched). Defaults to False to allow matching backreferences with different ctx values with each other, such as a Name as a target of an Assign with the same name later used in an expression (Store vs. Load). Also as a conveninence since when creating AST nodes for patterns the ctx field may be created automatically if you don't specify it so may inadvertantly break matches where you don't want to take that into consideration.

Returns:

  • FSTMatch: The match object on successful match.
  • None: Did not match.
class M(M_Pattern_One):

Tagging pattern container. If the given pattern matches then tags specified here will be returned in the FSTMatch result object. The tags can be static values but also the matched node can be returned in a given tag if the pattern is passed as a keyword parameter (the first one). This is useful for matching subparts of a target as the whole match target is already returned in FSTMatch.matched on success.

Parameters:

  • anon_pat: If the pattern to match is provided in this then the matched node is not returned in tags. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the pattern to match and the name of the tag to use for the matched node.
  • tags: Any static tags to return on a successful match (including the pattern to match as the first keyword if not provided in anon_pat).

Examples:

>>> M('var') .match(Name(id='NOT_VAR'))
>>> M('var') .match(Name(id='var'))
<FSTMatch Name(id='var')>
>>> M('var', tag='static') .match(Name(id='var'))
<FSTMatch Name(id='var') {'tag': 'static'}>
>>> M(node='var', tag='static') .match(Name(id='var'))
<FSTMatch Name(id='var') {'node': Name(id='var'), 'tag': 'static'}>
>>> M(M(M(node='var'), add1=1), add2=2) .match(Name(id='var'))
<FSTMatch Name(id='var') {'node': Name(id='var'), 'add1': 1, 'add2': 2}>
M( anon_pat: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]], fst.match._NotSet] = <NotSet>, /, **tags)
Inherited Members
M_Pattern
match
class MNOT(M_Pattern_One):

Tagging NOT logic pattern container. If the given pattern DOES NOT match then tags specified here will be returned in the FSTMatch result object. The tags can be specified with static values but also the unmatched node can be returned in a given tag name.

Any tags that were being propagated up from successful matches are discarded since that constitutes an unsuccessful match for this node. And any unsuccessful matches were not propagating any tags up anyway. So this node guarantees that the only tags that it returns are ones that it itself provides.

Parameters:

  • anon_pat: If the pattern to not match is provided in this then the unmatched node is not returned in tags. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the pattern to not match and the name of the tag to use for the unmatched node.
  • tags: Any static tags to return on an unsuccessful match (including the pattern to not match as the first keyword if not provided in anon_pat).

Examples:

>>> MNOT('var') .match(Name(id='NOT_VAR'))
<FSTMatch Name(id='NOT_VAR')>
>>> MNOT('var') .match(Name(id='var'))
>>> MNOT('var', tag='static') .match(Name(id='NOT_VAR'))
<FSTMatch Name(id='NOT_VAR') {'tag': 'static'}>
>>> MNOT(node='var', tag='static') .match(Name(id='NOT_VAR'))
<FSTMatch Name(id='NOT_VAR') {'node': Name(id='NOT_VAR'), 'tag': 'static'}>
>>> MNOT(MNOT(node='var', tag='static')) .match(Name(id='NOT_VAR'))
>>> MNOT(MNOT(MNOT(node='var'), add1=1), add2=2) .match(Name(id='NOT_VAR'))
<FSTMatch Name(id='NOT_VAR') {'add2': 2}>
MNOT( anon_pat: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]], fst.match._NotSet] = <NotSet>, /, **tags)
Inherited Members
M_Pattern
match
class MOR(M_Pattern_Many):

Simple OR pattern. Matches if any of the given patterns match.

Parameters:

  • anon_pats: Patterns that constitute a successful match, only need one to match. Checked in order and exit on first successful match.
  • tagged_pats: Patterns that constitute a successful match, only need one to match. Checked in order and exit on first successful match. The first target matched with any one of these patterns will be returned in its corresponding tag (keyword name).

Examples:

>>> MOR('a', this='b') .match(FST('a'))
<FSTMatch <Name ROOT 0,0..0,1>>
>>> MOR('a', this='b') .match(FST('b'))
<FSTMatch <Name ROOT 0,0..0,1> {'this': <Name ROOT 0,0..0,1>}>
>>> MOR('a', this='b') .match(FST('c'))

Mixed pattern types and nesting.

>>> pat = MOR(Name('good'), M(m=Call, static='tag'), st=Starred)
>>> pat.match(FST('bad'))
>>> pat.match(FST('good'))
<FSTMatch <Name ROOT 0,0..0,4>>
>>> pat.match(FST('*starred'))
<FSTMatch <Starred ROOT 0,0..0,8> {'st': <Starred ROOT 0,0..0,8>}>
>>> pat.match(FST('call()'))
<FSTMatch <Call ROOT 0,0..0,6> {'m': <Call ROOT 0,0..0,6>, 'static': 'tag'}>
>>> pat.match(FST('bin + op'))
MOR( *anon_pats: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]], **tagged_pats: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]])
Inherited Members
M_Pattern
match
class MAND(M_Pattern_Many):

Simple AND pattern. Matches only if all of the given patterns match. This pattern isn't terribly useful for straight node matches as if you try to combine different node types using this node their types become mutually exclusive and will make this always fail. Where this can come in handy for example is when examining list fields for multiple conditions.

Parameters:

  • anon_pats: Patterns that need to match to constitute a success. Checked in order.
  • tagged_pats: Patterns that need to match to constitute a success. Checked in order. All the targets matched with these patterns will be returned in their corresponding tags (keyword names).

Examples:

The following will always fail as a node cannot be both a Name AND a Call at the same time.

>>> MAND(Name, Call) .match(FST('name'))
>>> MAND(Name, Call) .match(FST('call()'))

More sensical usage below, for example that a list starts with a and contains at least two b.

>>> pat = MList(MAND(['a', MQSTAR], [MQSTAR, 'b', MQSTAR, 'b', MQSTAR]))
>>> pat.match(FST('[a, b, c]'))
>>> pat.match(FST('[a, b, b, c]'))
<FSTMatch <List ROOT 0,0..0,12>>
>>> pat.match(FST('[d, a, b, b, c]'))
>>> pat.match(FST('[a, x, b, y, z, b, c, b]'))
<FSTMatch <List ROOT 0,0..0,24>>
MAND( *anon_pats: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]], **tagged_pats: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]])
Inherited Members
M_Pattern
match
class MMAYBE(M_Pattern_One):

This is a pattern or None match. It can be used to optionally match single-element fields which may or may not be present. That is, both a normal value which matches the pattern and a None value are considered a successful match. A non-None value which does NOT match the pattern is a failure.

This is essentially MOR(pattern, None).

Parameters:

  • anon_pat: If the pattern to match is provided in this then the matched node is not returned in tags. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the pattern to match and the name of the tag to use for the matched node.
  • tags: Any static tags to return on a successful match (including the pattern to match as the first keyword if not provided in anon_pat). These are added AFTER all the child match tags.

Examples:

Single optional nodes.

>>> MFunctionDef(returns=MMAYBE('int')) .match(FST('def f(): pass'))
<FSTMatch <FunctionDef ROOT 0,0..0,13>>
>>> MFunctionDef(returns=MMAYBE('int')) .match(FST('def f() -> int: pass'))
<FSTMatch <FunctionDef ROOT 0,0..0,20>>
>>> MFunctionDef(returns=MMAYBE('int')) .match(FST('def f() -> str: pass'))

Parts of multinode elements.

>>> MDict([MMAYBE('a')], ['b']) .match(FST('{a: b}'))
<FSTMatch <Dict ROOT 0,0..0,6>>
>>> MDict([MMAYBE('a')], ['b']) .match(FST('{**b}'))
<FSTMatch <Dict ROOT 0,0..0,5>>
>>> MDict([MMAYBE('a')], ['b']) .match(FST('{x: b}'))

Non-node primitive fields.

>>> MExceptHandler(name=MMAYBE('n')) .match(FST('except x as n: pass'))
<FSTMatch <ExceptHandler ROOT 0,0..0,19>>
>>> MExceptHandler(name=MMAYBE('n')) .match(FST('except x as o: pass'))
>>> MExceptHandler(name=MMAYBE('n')) .match(FST('except x: pass'))
<FSTMatch <ExceptHandler ROOT 0,0..0,14>>
MMAYBE( anon_pat: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]], fst.match._NotSet] = <NotSet>, /, **tags)
Inherited Members
M_Pattern
match
class MTYPES(M_Pattern):

This pattern matches any one of the given types and arbitrary fields if present. This is essentially MAND(MOR(*types), MAST(**fields)). But the types must be actual types, not other patterns.

Note: Since there are several fields which can be either an individual element or list of elements, matching a list pattern vs. a non-list and vice versa is just treated as a non-match.

Parameters:

  • anon_types: If the types to match are provided in this then the matched node is not returned in tags. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the types to match and the name of the tag to use for the matched node. The types to match are an iterable of AST or MAST TYPES, not instances. In order to match successfully the target must be at least one of these types (non-leaf types like stmt included). If you just want to match any possible AST type with a given set of fields you can use MAST(**fields) instead of this.
  • fields: Field names which must be present (unless wildcard ...) along with the patterns they need to match.

Examples:

Whether a statement type that CAN have a docstring actually has a docstring.

>>> pat = MTYPES(
...     (ClassDef, FunctionDef, AsyncFunctionDef),
...     body=[MExpr(MConstant(str)), MQSTAR],
... )
>>> pat.match(FST('def f(): "docstr"; pass'))
<FSTMatch <FunctionDef ROOT 0,0..0,23>>
>>> pat.match(FST('if 1: "NOTdocstr"'))
>>> pat.match(FST('def f(): pass; "NOTdocstr"'))
>>> pat.match(FST('class cls: "docstr"; pass'))
<FSTMatch <ClassDef ROOT 0,0..0,25>>
>>> pat = MTYPES(
...     tag=(ClassDef, FunctionDef, AsyncFunctionDef),
...     body=[MExpr(MConstant(str)), MQSTAR],
... )
>>> pat.match(FST('class cls: "docstr"; pass'))
<FSTMatch <ClassDef ROOT 0,0..0,25> {'tag': <ClassDef ROOT 0,0..0,25>}>
MTYPES( anon_types: Union[Iterable[type[ast.AST | MAST]], fst.match._NotSet] = <NotSet>, /, **fields: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]])
Inherited Members
M_Pattern
match
class MRE(M_Pattern):

Tagging regex pattern. Normal re.Pattern can be used and that will just be checked using re.match() and the re.Match object is lost. If this pattern is used instead then you can specify the use of re.match() or re.search(), as well as allowing the re.Match object to be returned as a tag.

Parameters:

  • anon_re_pat: If the pattern to match is provided in this (either as a str to compile or an already compiled re.Pattern) then the matched re.Match is not returned in tags. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the pattern to match and the name of the tag to use for the matched re.Match object.
  • flags: If passing a str as the pattern then these are the re flags to pass to re.compile(). If passing an already compiled re.Pattern then this must remain 0.
  • tags: Any static tags to return on a successful match (including the pattern to match as the first keyword if not provided in anon_re_pat).

Examples:

>>> from fst.docs import ppmatch  # pretty-print FSTMatch
>>> MRE('good|bad|ugly') .match(Name('ugly'))
<FSTMatch Name(id='ugly')>
>>> MRE('good|bad|ugly') .match(Name('passable'))

Has bad in it.

>>> ppmatch(MRE(tag='.*bad.*') .match(arg('this_arg_is_not_so_bad')))
<FSTMatch arg(arg='this_arg_is_not_so_bad', annotation=None, type_comment=None)
  {'tag': <re.Match object; span=(0, 22), match='this_arg_is_not_so_bad'>}>

Another way so we can get the exact location from the re.Match object.

>>> ppmatch(MRE(tag='bad', search=True) .match(arg('this_arg_is_not_so_bad')))
<FSTMatch arg(arg='this_arg_is_not_so_bad', annotation=None, type_comment=None)
  {'tag': <re.Match object; span=(19, 22), match='bad'>}>
>>> ppmatch(MDict(_all=[MQSTAR(t=MRE('a: .'))]) .match(FST('{a: b, a: z}')))
<FSTMatch <Dict ROOT 0,0..0,12>
  't': [
    <FSTMatch <<Dict ROOT 0,0..0,12>._all[:1]>>,
    <FSTMatch <<Dict ROOT 0,0..0,12>._all[1:2]>>,
  ],
}>
MRE( anon_re_pat: str | re.Pattern | fst.match._NotSet = <NotSet>, /, flags: int = 0, search: bool = False, **tags)
Inherited Members
M_Pattern
match
class MCB(M_Pattern_One):

Callback to check target, which can be a node (AST or FST depending on the type of tree the pattern was called on) or constant or a list of ASTs or constants.

Parameters:

  • anon_callback: The function to call on each target to check. Depending on where in the pattern structure this pattern is used, the function may be called with a node or a primitive, or even a list of elements. Further, depending on the initial target of the match, the node may be FST if the target was an FST node and AST otherwise. If the function returns a truthy value then the match is considered a success, and likewise falsey means failure. If this is not provided then the callback is taken from the first keyword in tags just like for the M pattern.
  • tag_ret: If this is set to True then the truthy return value is returned in the pattern tag instead of the target matched. This only applies if the callback is passed as the first keyword in tags instead of in anon_callback, as in that case no target tag is available to return. Also keep in mind the "truthy value" bit in case a successful match might want to return a falsey value, it would need to be accomodated somehow (wrapped in a tuple maybe). Or just provide an explicit fail_obj to check against to determine failure.
  • fail_obj: An explicit object to check identity against to determine if the callback failed.
  • pass_tags: If False then the normal single-object callback format is used. If True then will call the callback with an additional parameter which is a tag getter function which allows the callback to get tags which have been set up to this point. The tag getter works in the same way as dict.get() and the default for no tag is fst.match.NotSet.

Examples:

>>> in_range = lambda x: 2 < x < 8
>>> pat = MConstant(MCB(in_range))
>>> pat.match(FST('1'))
>>> pat.match(FST('3'))
<FSTMatch <Constant ROOT 0,0..0,1>>
>>> pat.match(FST('7'))
<FSTMatch <Constant ROOT 0,0..0,1>>
>>> pat.match(FST('10'))

Check for only parenthesized tuples.

>>> pat = MCB(FST.is_parenthesized_tuple)
>>> pat.match(FST('x, y, z'))
>>> pat.match(FST('(x, y, z)'))
<FSTMatch <Tuple ROOT 0,0..0,9>>
>>> pat.match(FST('[x, y, z]'))

Get node along with name in uppercase.

>>> pat = M(node=Name(MCB(upper=str.upper, tag_ret=True)))
>>> pat.match(FST('a.b'))
>>> pat.match(FST('some_name'))
<FSTMatch <Name ROOT 0,0..0,9> {'upper': 'SOME_NAME', 'node': <Name ROOT 0,0..0,9>}>

An explicit fail object can be provided in case you want to be able to tag falsey values directly, it is checked by identity.

>>> MCB(tag=lambda f: False, tag_ret=True, fail_obj=None) .match(FST('a'))
<FSTMatch <Name ROOT 0,0..0,1> {'tag': False}>
>>> MCB(tag=lambda f: None, tag_ret=True, fail_obj=None) .match(FST('a'))

The type of node passed to the callback depends on the type of tree that match() is called on.

>>> pat = MCB(lambda n: print(type(n)))
>>> pat.match(Name('name'))
<class 'ast.Name'>
>>> pat.match(FST('name'))
<class 'fst.fst.FST'>

A tag getter function can be passed to the callback so it can request tags that have been set so far.

>>> m = M(prev=MCB(
...     lambda t, g: (print(f"this: {t}, prev: {g('prev')}"),),
...     pass_tags=True,
... ))
>>> MList([m, m, m]) .match(FST('[a, b, c]'))
this: <Name 0,1..0,2>, prev: <NotSet>
this: <Name 0,4..0,5>, prev: <Name 0,1..0,2>
this: <Name 0,7..0,8>, prev: <Name 0,4..0,5>
<FSTMatch <List ROOT 0,0..0,9> {'prev': <Name 0,7..0,8>}>
MCB( anon_callback: Union[Callable[[ast.AST | ellipsis | int | float | complex | str | bytes | bool | None], object], Callable[[Union[fst.fst.FST, ellipsis, int, float, complex, str, bytes, bool, NoneType]], object], Callable[[ast.AST | ellipsis | int | float | complex | str | bytes | bool | None, Callable[[str, object], object]], object], Callable[[Union[fst.fst.FST, ellipsis, int, float, complex, str, bytes, bool, NoneType], Callable[[str, object], object]], object], fst.match._NotSet] = <NotSet>, /, tag_ret: bool = False, fail_obj: object = <NotSet>, pass_tags: bool = False, **tags)
CallbackType = typing.Union[typing.Callable[[ast.AST | ellipsis | int | float | complex | str | bytes | bool | None], object], typing.Callable[[typing.Union[ForwardRef('fst.FST'), ellipsis, int, float, complex, str, bytes, bool, NoneType]], object], typing.Callable[[ast.AST | ellipsis | int | float | complex | str | bytes | bool | None, typing.Callable[[str, object], object]], object], typing.Callable[[typing.Union[ForwardRef('fst.FST'), ellipsis, int, float, complex, str, bytes, bool, NoneType], typing.Callable[[str, object], object]], object]]

Depending on if the match target is an FST or AST and if the MCB parameter pass_tags is True or False, this callback will be one of:

  • Callable[[[AST | constant]], object]
  • Callable[[[FST | constant]], object]
  • Callable[[[AST | constant], Callable[[str, object], object]], object]
  • Callable[[[FST | constant], Callable[[str, object], object]], object]

Where constant is ellipsis | int | float | complex | str | bytes | bool | None.

Inherited Members
M_Pattern
match
class MTAG(M_Pattern_One):

Match previously matched node (backreference). Looks through tags of current matches and if found then attempts to match against the value of the tag. Meant for matching previously matched nodes but can match anything which can work as a valid pattern in a tag, however it got there.

For the sake of sanity and efficiency, does not recurse into lists of FSTMatch objects that have already been built by quantifier patterns. Can match those tags if they are not being put into FSTMatch objects though.

Parameters:

  • anon_tag: If the source tag to match is provided in this then the new matched node is not returned in tags. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the source tag to match and the name of the new tag to use for the matched node.
  • tags: Any static tags to return on a successful match (including the pattern to match as the first keyword if not provided in anon_pat).

Examples:

>>> from fst.docs import ppmatch  # pretty-print FSTMatch
>>> MBinOp(M(left='a'), right=MTAG('left')) .match(FST('a + a'))
<FSTMatch <BinOp ROOT 0,0..0,5> {'left': <Name 0,0..0,1>}>
>>> MBinOp(M(left='a'), right=MTAG('left')) .match(FST('a + b'))

The tag must already have been matched, not be in the future.

>>> MBinOp(MTAG('right'), right=M(right='a')) .match(FST('a + a'))

Works just fine with quantifier patterns.

>>> pat = MList([M(first='a'), MQSTAR(st=MTAG('first'))])
>>> ppmatch(pat.match(FST('[a, a, a]')))
<FSTMatch <List ROOT 0,0..0,9>
  'first': <Name 0,1..0,2>,
  'st': [
    <FSTMatch <Name 0,4..0,5>>,
    <FSTMatch <Name 0,7..0,8>>,
  ],
}>
>>> pat.match(FST('[a, a, a, b]'))

Can match previously matched multinode items from Dict, MatchMapping or arguments.

>>> MDict(_all=[M(start=...), MQSTAR, MTAG('start')]) .match(FST('{1: a, 1: a}'))
<FSTMatch <Dict ROOT 0,0..0,12> {'start': <<Dict ROOT 0,0..0,12>._all[:1]>}>
MTAG(anon_tag: str | fst.match._NotSet = <NotSet>, /, **tags)
Inherited Members
M_Pattern
match
class MQ(M_Pattern_One):

Quantifier pattern. Matches at least min and at most max instances of the given pattern. Since this pattern can match an arbitrary number of actual targets, if there is a tag for the matched patterns they are given as a list of FSTMatch objects instead of just one.

This is the base class for MQSTAR, MQPLUS, MQOPT, MQMIN, MQMAX and MQN and can do everything they can with the appropriate values for min and max. Those classes are provided regardless for convenience and cleaner pattern structuring.

Using the wildcard pattern ... means match anything the given number of times and is analogous to the regex dot . pattern.

Quantifiers can ONLY live as DIRECT children of a list field, so MList(elts=[MQSTAR]) is valid while MList(elts=[M(MQSTAR)]) is not.

Unlike other patterns, all the quantifier patterns can take a sublist of patterns as a pattern which allows matching an arbitrary nunmber this complete sublist sequentially in the list field the quantifier pattern is matching.

Quantifier pattern sublists can ONLY live as DIRECT child patterns of a quantifier, so MQSTAR([...]) is valid while MQSTAR(M([...])) is not.

This pattern is greedy by default but has a non-greedy version child class MQ.NG. This pattern can be used in exactly the same way but will match non-greedily.

Parameters:

  • anon_pat: If the pattern to match is provided in this then the matched nodes tags are all merged in order and returned as normal tags, with later match tags overriding earlier if same. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the pattern to match. In this case the keyword is used as a tag which is used to return a list of FSTMatch objects for each node matched by the pattern.
  • min: The minimum number of pattern matches needed for a successful match.
  • max: The maximum number of pattern matches taken for a successful match. None means unbounded.
  • tags: Any static tags to return on a successful match (including the pattern to match as the first keyword if not provided in anon_pat). These are added AFTER all the child match tags.

Examples:

>>> from fst.docs import ppmatch  # pretty-print FSTMatch
>>> MList([MQ('a', 1, 2)]) .match(FST('[]'))
>>> MList([MQ('a', 1, 2)]) .match(FST('[a]'))
<FSTMatch <List ROOT 0,0..0,3>>
>>> MList([MQ('a', 1, 2)]) .match(FST('[a, a]'))
<FSTMatch <List ROOT 0,0..0,6>>
>>> MList([MQ('a', 1, 2)]) .match(FST('[a, a, a]'))
>>> MList([MQ('a', 1, 2), MQSTAR]) .match(FST('[a, a, a]'))
<FSTMatch <List ROOT 0,0..0,9>>
>>> pat = MGlobal([MQSTAR.NG, MQ(t='c', min=1, max=2), MQSTAR])
>>> ppmatch(FST('global a, b, c, c, d, e') .match(pat))
<FSTMatch <Global ROOT 0,0..0,23>
  't': [
    <FSTMatch <<Global ROOT 0,0..0,23>.names[2:3]>>,
    <FSTMatch <<Global ROOT 0,0..0,23>.names[3:4]>>,
  ],
}>
>>> pat = MList([MQSTAR.NG, MQ(t=MRE('c|d'), min=1, max=3), MQSTAR])
>>> ppmatch(m := FST('[a, b, c, c, d, c, e]') .match(pat))
<FSTMatch <List ROOT 0,0..0,21>
  't': [
    <FSTMatch <Name 0,7..0,8>>,
    <FSTMatch <Name 0,10..0,11>>,
    <FSTMatch <Name 0,13..0,14>>,
  ],
}>
>>> [mm.matched.src for mm in m['t']]
['c', 'c', 'd']

Sublist matching, will match the sequence "a, b" twice in the example below.

>>> ppmatch(MList([MQ(t=['a', 'b'], min=1, max=2)]) .match(FST('[a, b, a, b]')))
<FSTMatch <List ROOT 0,0..0,12>
  't': [
    <FSTMatch [<Name 0,1..0,2>, <Name 0,4..0,5>]>,
    <FSTMatch [<Name 0,7..0,8>, <Name 0,10..0,11>]>,
  ],
}>
MQ( anon_pat: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]], fst.match._NotSet] = <NotSet>, /, min: int | fst.match._NotSet = <NotSet>, max: int | None | fst.match._NotSet = <NotSet>, **tags)
Inherited Members
M_Pattern
match
class MQ.NG(MQ):

Non-greedy version of MQ quantifier pattern.

Inherited Members
MQ
MQ
NG
M_Pattern
match
class MQSTAR(MQ):

Star quantifier pattern, zero or more. Shortcut for MQ(anon_pat, min=0, max=None, **tags). Has non-greedy version child class MQSTAR.NG.

This class type itself as well as the the non-greedy version can be used directly as a shortcut for MQSTAR(...) or MQSTAR.NG(...), the equivalents of regex .* and .*?.

Parameters:

  • anon_pat: If the pattern to match is provided in this then the matched nodes tags are all merged in order and returned as normal tags, with later match tags overriding earlier if same. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the pattern to match. In this case the keyword is used as a tag which is used to return a list of FSTMatch objects for each node matched by the pattern.
  • tags: Any static tags to return on a successful match (including the pattern to match as the first keyword if not provided in anon_pat). These are added AFTER all the child match tags.

Examples:

>>> from fst.docs import ppmatch  # pretty-print FSTMatch
>>> MList([MQSTAR(t='a')]) .match(FST('[]'))
<FSTMatch <List ROOT 0,0..0,2> {'t': []}>
>>> MList([MQSTAR(t='a')]) .match(FST('[a]'))
<FSTMatch <List ROOT 0,0..0,3> {'t': [<FSTMatch <Name 0,1..0,2>>]}>
>>> ppmatch(MList([MQSTAR(t='a')]) .match(FST('[a, a]')))
<FSTMatch <List ROOT 0,0..0,6>
  {'t': [<FSTMatch <Name 0,1..0,2>>, <FSTMatch <Name 0,4..0,5>>]}>
>>> ppmatch(MList([MQSTAR(t='a')]) .match(FST('[a, a, a]')))
<FSTMatch <List ROOT 0,0..0,9>
  't': [
    <FSTMatch <Name 0,1..0,2>>,
    <FSTMatch <Name 0,4..0,5>>,
    <FSTMatch <Name 0,7..0,8>>,
  ],
}>
>>> ppmatch(MList([MQSTAR(t='a'), MQSTAR]) .match(FST('[a, a, a]')))
<FSTMatch <List ROOT 0,0..0,9>
  't': [
    <FSTMatch <Name 0,1..0,2>>,
    <FSTMatch <Name 0,4..0,5>>,
    <FSTMatch <Name 0,7..0,8>>,
  ],
}>
>>> MList([MQSTAR.NG(t='a'), MQSTAR]) .match(FST('[a, a, a]'))
<FSTMatch <List ROOT 0,0..0,9> {'t': []}>
MQSTAR( anon_pat: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]], fst.match._NotSet] = <NotSet>, /, **tags)
Inherited Members
M_Pattern
match
class MQSTAR.NG(MQSTAR):

Non-greedy version of MQSTAR quantifier pattern.

Inherited Members
MQSTAR
MQSTAR
NG
M_Pattern
match
class MQPLUS(MQ):

Plus quantifier pattern, one or more. Shortcut for MQ(anon_pat, min=1, max=None, **tags). Has non-greedy version child class MQPLUS.NG.

This class type itself as well as the the non-greedy version can be used directly as a shortcut for MQPLUS(...) or MQPLUS.NG(...), the equivalents of regex .+ and .+?.

Parameters:

  • anon_pat: If the pattern to match is provided in this then the matched nodes tags are all merged in order and returned as normal tags, with later match tags overriding earlier if same. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the pattern to match. In this case the keyword is used as a tag which is used to return a list of FSTMatch objects for each node matched by the pattern.
  • tags: Any static tags to return on a successful match (including the pattern to match as the first keyword if not provided in anon_pat). These are added AFTER all the child match tags.

Examples:

>>> from fst.docs import ppmatch  # pretty-print FSTMatch
>>> MList([MQPLUS(t='a')]) .match(FST('[]'))
>>> MList([MQPLUS(t='a')]) .match(FST('[a]'))
<FSTMatch <List ROOT 0,0..0,3> {'t': [<FSTMatch <Name 0,1..0,2>>]}>
>>> ppmatch(MList([MQPLUS(t='a')]) .match(FST('[a, a]')))
<FSTMatch <List ROOT 0,0..0,6>
  {'t': [<FSTMatch <Name 0,1..0,2>>, <FSTMatch <Name 0,4..0,5>>]}>
>>> ppmatch(MList([MQPLUS(t='a')]) .match(FST('[a, a, a]')))
<FSTMatch <List ROOT 0,0..0,9>
  't': [
    <FSTMatch <Name 0,1..0,2>>,
    <FSTMatch <Name 0,4..0,5>>,
    <FSTMatch <Name 0,7..0,8>>,
  ],
}>
>>> ppmatch(MList([MQPLUS(t='a'), MQSTAR]) .match(FST('[a, a, a]')))
<FSTMatch <List ROOT 0,0..0,9>
  't': [
    <FSTMatch <Name 0,1..0,2>>,
    <FSTMatch <Name 0,4..0,5>>,
    <FSTMatch <Name 0,7..0,8>>,
  ],
}>
>>> MList([MQPLUS.NG(t='a'), MQSTAR]) .match(FST('[a, a, a]'))
<FSTMatch <List ROOT 0,0..0,9> {'t': [<FSTMatch <Name 0,1..0,2>>]}>
MQPLUS( anon_pat: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]], fst.match._NotSet] = <NotSet>, /, **tags)
Inherited Members
M_Pattern
match
class MQPLUS.NG(MQPLUS):

Non-greedy default version of MQPLUS quantifier pattern.

Inherited Members
MQPLUS
MQPLUS
NG
M_Pattern
match
class MQOPT(MQ):

Zero or one (optional) quantifier pattern. Shortcut for MQ(anon_pat, min=0, max=1, **tags). Has non-greedy version child class MQOPT.NG.

This class type itself as well as the the non-greedy version can be used directly as a shortcut for MQOPT(...) or MQOPT.NG(...), the equivalents of regex .? and .??.

Parameters:

  • anon_pat: If the pattern to match is provided in this then the matched node tags are returned as normal tags. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the pattern to match. In this case the keyword is used as a tag which is used to return either an empty list or a list with a single FSTMatch object for the node matched by the pattern.
  • tags: Any static tags to return on a successful match (including the pattern to match as the first keyword if not provided in anon_pat). These are added AFTER all the child match tags.

Examples:

>>> MList([MQOPT(t='a')]) .match(FST('[]'))
<FSTMatch <List ROOT 0,0..0,2> {'t': []}>
>>> MList([MQOPT(t='a')]) .match(FST('[a]'))
<FSTMatch <List ROOT 0,0..0,3> {'t': [<FSTMatch <Name 0,1..0,2>>]}>
>>> MList([MQOPT(t='a')]) .match(FST('[b]'))
>>> MList([MQOPT(t='a')]) .match(FST('[a, a]'))
>>> MList([MQOPT(t='a'), MQSTAR]) .match(FST('[a, a]'))
<FSTMatch <List ROOT 0,0..0,6> {'t': [<FSTMatch <Name 0,1..0,2>>]}>
>>> MList([MQOPT.NG(t='a'), MQSTAR]) .match(FST('[a, a]'))
<FSTMatch <List ROOT 0,0..0,6> {'t': []}>
>>> MList([MQOPT.NG(t='a'), 'b']) .match(FST('[a, b]'))
<FSTMatch <List ROOT 0,0..0,6> {'t': [<FSTMatch <Name 0,1..0,2>>]}>
MQOPT( anon_pat: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]], fst.match._NotSet] = <NotSet>, /, **tags)
Inherited Members
M_Pattern
match
class MQOPT.NG(MQOPT):

Non-greedy version of MQOPT quantifier pattern.

Inherited Members
MQOPT
MQOPT
NG
M_Pattern
match
class MQMIN(MQ):

Minimum count quantifier pattern. Shortcut for MQ(anon_pat, min=min, max=None, **tags). Has non-greedy version child class MQMIN.NG.

Parameters:

  • anon_pat: If the pattern to match is provided in this then the matched nodes tags are all merged in order and returned as normal tags, with later match tags overriding earlier if same. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the pattern to match. In this case the keyword is used as a tag which is used to return a list of FSTMatch objects for each node matched by the pattern.
  • min: The minimum number of pattern matches needed for a successful match.
  • tags: Any static tags to return on a successful match (including the pattern to match as the first keyword if not provided in anon_pat). These are added AFTER all the child match tags.

Examples:

>>> from fst.docs import ppmatch  # pretty-print FSTMatch
>>> MList([MQMIN(t='a', min=2)]) .match(FST('[]'))
>>> MList([MQMIN(t='a', min=2)]) .match(FST('[a]'))
>>> ppmatch(MList([MQMIN(t='a', min=2)]) .match(FST('[a, a]')))
<FSTMatch <List ROOT 0,0..0,6>
  {'t': [<FSTMatch <Name 0,1..0,2>>, <FSTMatch <Name 0,4..0,5>>]}>
>>> ppmatch(MList([MQMIN(t='a', min=2)]) .match(FST('[a, a, a]')))
<FSTMatch <List ROOT 0,0..0,9>
  't': [
    <FSTMatch <Name 0,1..0,2>>,
    <FSTMatch <Name 0,4..0,5>>,
    <FSTMatch <Name 0,7..0,8>>,
  ],
}>
>>> ppmatch(MList([MQMIN(t='a', min=2), MQSTAR]) .match(FST('[a, a, a]')))
<FSTMatch <List ROOT 0,0..0,9>
  't': [
    <FSTMatch <Name 0,1..0,2>>,
    <FSTMatch <Name 0,4..0,5>>,
    <FSTMatch <Name 0,7..0,8>>,
  ],
}>
>>> ppmatch(MList([MQMIN.NG(t='a', min=2), MQSTAR]) .match(FST('[a, a, a]')))
<FSTMatch <List ROOT 0,0..0,9>
  {'t': [<FSTMatch <Name 0,1..0,2>>, <FSTMatch <Name 0,4..0,5>>]}>
MQMIN( anon_pat: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]], fst.match._NotSet] = <NotSet>, /, min: int | fst.match._NotSet = <NotSet>, **tags)
Inherited Members
M_Pattern
match
class MQMIN.NG(MQMIN):

Non-greedy version of MQMIN quantifier pattern.

Inherited Members
MQMIN
MQMIN
NG
M_Pattern
match
class MQMAX(MQ):

Maximum count quantifier pattern. Shortcut for MQ(anon_pat, min=0, max=max, **tags). Has non-greedy version child class MQMAX.NG.

Parameters:

  • anon_pat: If the pattern to match is provided in this then the matched nodes tags are all merged in order and returned as normal tags, with later match tags overriding earlier if same. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the pattern to match. In this case the keyword is used as a tag which is used to return a list of FSTMatch objects for each node matched by the pattern.
  • max: The maximum number of pattern matches taken for a successful match. None means unbounded.
  • tags: Any static tags to return on a successful match (including the pattern to match as the first keyword if not provided in anon_pat). These are added AFTER all the child match tags.

Examples:

>>> from fst.docs import ppmatch  # pretty-print FSTMatch
>>> MList([MQMAX(t='a', max=2)]) .match(FST('[]'))
<FSTMatch <List ROOT 0,0..0,2> {'t': []}>
>>> MList([MQMAX(t='a', max=2)]) .match(FST('[a]'))
<FSTMatch <List ROOT 0,0..0,3> {'t': [<FSTMatch <Name 0,1..0,2>>]}>
>>> ppmatch(MList([MQMAX(t='a', max=2)]) .match(FST('[a, a]')))
<FSTMatch <List ROOT 0,0..0,6>
  {'t': [<FSTMatch <Name 0,1..0,2>>, <FSTMatch <Name 0,4..0,5>>]}>
>>> MList([MQMAX(t='a', max=2)]) .match(FST('[a, a, a]'))
>>> ppmatch(MList([MQMAX(t='a', max=2), MQSTAR]) .match(FST('[a, a, a]')))
<FSTMatch <List ROOT 0,0..0,9>
  {'t': [<FSTMatch <Name 0,1..0,2>>, <FSTMatch <Name 0,4..0,5>>]}>
>>> MList([MQMAX.NG(t='a', max=2), MQSTAR]) .match(FST('[a, a, a]'))
<FSTMatch <List ROOT 0,0..0,9> {'t': []}>
MQMAX( anon_pat: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]], fst.match._NotSet] = <NotSet>, /, max: int | None | fst.match._NotSet = <NotSet>, **tags)
Inherited Members
M_Pattern
match
class MQMAX.NG(MQMAX):

Non-greedy version of MQMAX quantifier pattern.

Inherited Members
MQMAX
MQMAX
NG
M_Pattern
match
class MQN(MQ):

Exact count quantifier pattern. Shortcut for MQ(anon_pat, min=n, max=n, **tags). Does NOT have a non-greedy version child class MQN.NG as that would not make any sense. Instead has itself as an attribute NG so can still be used as MQN.NG.

Parameters:

  • anon_pat: If the pattern to match is provided in this then the matched nodes tags are all merged in order and returned as normal tags, with later match tags overriding earlier if same. If this is missing then there must be at least one element in tags and the first keyword there will be taken to be the pattern to match. In this case the keyword is used as a tag which is used to return a list of FSTMatch objects for each node matched by the pattern.
  • n: The exact number of pattern matches taken for a successful match.
  • tags: Any static tags to return on a successful match (including the pattern to match as the first keyword if not provided in anon_pat). These are added AFTER all the child match tags.

Examples:

>>> MList([MQN(t='a', n=1)]) .match(FST('[]'))
>>> MList([MQN(t='a', n=1)]) .match(FST('[a]'))
<FSTMatch <List ROOT 0,0..0,3> {'t': [<FSTMatch <Name 0,1..0,2>>]}>
>>> MList([MQN(t='a', n=1)]) .match(FST('[a, a]'))
>>> MList([MQN(t='a', n=1), MQSTAR]) .match(FST('[a]'))
<FSTMatch <List ROOT 0,0..0,3> {'t': [<FSTMatch <Name 0,1..0,2>>]}>
MQN( anon_pat: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]], fst.match._NotSet] = <NotSet>, /, n: int | fst.match._NotSet = <NotSet>, **tags)
NG = <class 'MQN'>
Inherited Members
M_Pattern
match
class MAST(M_Pattern):

This class (and its non-leaf subclasses like Mstmt and Mexpr) can be used as an arbitrary field(s) pattern. Can match one or more fields (list or not, without list type errors), as long as the type matches (e.g. an Assign matches an Mstmt but not an Mexpr). This arbitrary field matching behavior is unique to non-leaf AST types, concrete types like MAssign always have fixed fields.

Note: Since there are several fields which can be either an individual element or list of elements, matching a list pattern vs. a non-list and vice versa is just treated as a non-match.

Parameters:

  • fields: If provided then is an arbitrary list of fields to match. Otherwise will just match based on type.

Examples:

Will match any AST node which has a value which is a Call. So will match return f(), await something(a, b, c) and just an Expr call(args), but not yield x or *(a, b, c).

>>> pat = MAST(value=Call)
>>> pat.match(FST('return f()'))
<FSTMatch <Return ROOT 0,0..0,10>>
>>> pat.match(FST('await something(a, b, c)'))
<FSTMatch <Await ROOT 0,0..0,24>>
>>> pat.match(FST('call(args)', Expr))
<FSTMatch <Expr ROOT 0,0..0,10>>
>>> pat.match(FST('yield x'))
>>> pat.match(FST('*(a, b, c)'))

Will match any statement which has a Constant string as the first element of its body, in other words a docstring.

>>> pat = Mstmt(body=[MExpr(MConstant(str)), MQSTAR])
>>> pat.match(FST('def f(): "docstr"; pass'))
<FSTMatch <FunctionDef ROOT 0,0..0,23>>
>>> pat.match(FST('class cls: "docstr"'))
<FSTMatch <ClassDef ROOT 0,0..0,19>>
>>> pat.match(FST('class cls: 1'))
>>> pat.match(FST('class cls: 1; "NOTdocstr"'))
>>> pat.match(FST('class cls: pass'))
MAST( **fields: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]])
Inherited Members
M_Pattern
match
class MAdd(Moperator):
Inherited Members
M_Pattern
match
class MAnd(Mboolop):
Inherited Members
M_Pattern
match
class MAnnAssign(Mstmt):
MAnnAssign( target: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, annotation: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, simple: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MAssert(Mstmt):
MAssert( test: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, msg: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MAssign(Mstmt):
MAssign( targets: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_comment: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MAsyncFor(Mstmt):
MAsyncFor( target: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, iter: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, orelse: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_comment: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MAsyncFunctionDef(Mstmt):
MAsyncFunctionDef( name: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, args: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, decorator_list: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, returns: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_comment: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_params: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MAsyncWith(Mstmt):
MAsyncWith( items: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_comment: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MAttribute(Mexpr):
MAttribute( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, attr: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, ctx: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MAugAssign(Mstmt):
MAugAssign( target: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, op: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MAwait(Mexpr):
MAwait( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MBinOp(Mexpr):
MBinOp( left: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, op: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, right: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MBitAnd(Moperator):
Inherited Members
M_Pattern
match
class MBitOr(Moperator):
Inherited Members
M_Pattern
match
class MBitXor(Moperator):
Inherited Members
M_Pattern
match
class MBoolOp(Mexpr):
MBoolOp( op: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, values: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MBreak(Mstmt):
Inherited Members
M_Pattern
match
class MCall(Mexpr):
MCall( func: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, args: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, keywords: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _args: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MClassDef(Mstmt):
MClassDef( name: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, bases: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, keywords: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, decorator_list: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_params: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _bases: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MCompare(Mexpr):
MCompare( left: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, ops: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, comparators: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _all: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MConstant(Mexpr):
MConstant( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]], kind: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
value
Inherited Members
M_Pattern
match
class MContinue(Mstmt):
Inherited Members
M_Pattern
match
class MDel(Mexpr_context):
Inherited Members
M_Pattern
match
class MDelete(Mstmt):
MDelete( targets: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MDict(Mexpr):
MDict( keys: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, values: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _all: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MDictComp(Mexpr):
MDictComp( key: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, generators: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MDiv(Moperator):
Inherited Members
M_Pattern
match
class MEq(Mcmpop):
Inherited Members
M_Pattern
match
class MExceptHandler(Mexcepthandler):
MExceptHandler( type: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, name: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MExpr(Mstmt):
MExpr( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MExpression(Mmod):
MExpression( body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MFloorDiv(Moperator):
Inherited Members
M_Pattern
match
class MFor(Mstmt):
MFor( target: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, iter: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, orelse: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_comment: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MFormattedValue(Mexpr):
MFormattedValue( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, conversion: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, format_spec: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MFunctionDef(Mstmt):
MFunctionDef( name: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, args: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, decorator_list: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, returns: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_comment: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_params: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MFunctionType(Mmod):
MFunctionType( argtypes: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, returns: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MGeneratorExp(Mexpr):
MGeneratorExp( elt: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, generators: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MGlobal(Mstmt):
MGlobal( names: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MGt(Mcmpop):
Inherited Members
M_Pattern
match
class MGtE(Mcmpop):
Inherited Members
M_Pattern
match
class MIf(Mstmt):
MIf( test: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, orelse: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MIfExp(Mexpr):
MIfExp( test: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, orelse: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MImport(Mstmt):
MImport( names: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MImportFrom(Mstmt):
MImportFrom( module: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, names: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, level: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MIn(Mcmpop):
Inherited Members
M_Pattern
match
class MInteractive(Mmod):
MInteractive( body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MInvert(Munaryop):
Inherited Members
M_Pattern
match
class MIs(Mcmpop):
Inherited Members
M_Pattern
match
class MIsNot(Mcmpop):
Inherited Members
M_Pattern
match
class MJoinedStr(Mexpr):
MJoinedStr( values: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MLShift(Moperator):
Inherited Members
M_Pattern
match
class MLambda(Mexpr):
MLambda( args: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MList(Mexpr):
MList( elts: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, ctx: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MListComp(Mexpr):
MListComp( elt: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, generators: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MLoad(Mexpr_context):
Inherited Members
M_Pattern
match
class MLt(Mcmpop):
Inherited Members
M_Pattern
match
class MLtE(Mcmpop):
Inherited Members
M_Pattern
match
class MMatMult(Moperator):
Inherited Members
M_Pattern
match
class MMatch(Mstmt):
MMatch( subject: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, cases: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MMatchAs(Mpattern):
MMatchAs( pattern: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, name: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MMatchClass(Mpattern):
MMatchClass( cls: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, patterns: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, kwd_attrs: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, kwd_patterns: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MMatchMapping(Mpattern):
MMatchMapping( keys: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, patterns: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, rest: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _all: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MMatchOr(Mpattern):
MMatchOr( patterns: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MMatchSequence(Mpattern):
MMatchSequence( patterns: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MMatchSingleton(Mpattern):
MMatchSingleton( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MMatchStar(Mpattern):
MMatchStar( name: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MMatchValue(Mpattern):
MMatchValue( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MMod(Moperator):
Inherited Members
M_Pattern
match
class MModule(Mmod):
MModule( body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_ignores: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MMult(Moperator):
Inherited Members
M_Pattern
match
class MName(Mexpr):
MName( id: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, ctx: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MNamedExpr(Mexpr):
MNamedExpr( target: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MNonlocal(Mstmt):
MNonlocal( names: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MNot(Munaryop):
Inherited Members
M_Pattern
match
class MNotEq(Mcmpop):
Inherited Members
M_Pattern
match
class MNotIn(Mcmpop):
Inherited Members
M_Pattern
match
class MOr(Mboolop):
Inherited Members
M_Pattern
match
class MPass(Mstmt):
Inherited Members
M_Pattern
match
class MPow(Moperator):
Inherited Members
M_Pattern
match
class MRShift(Moperator):
Inherited Members
M_Pattern
match
class MRaise(Mstmt):
MRaise( exc: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, cause: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MReturn(Mstmt):
MReturn( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MSet(Mexpr):
MSet( elts: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MSetComp(Mexpr):
MSetComp( elt: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, generators: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MSlice(Mexpr):
MSlice( lower: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, upper: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, step: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MStarred(Mexpr):
MStarred( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, ctx: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MStore(Mexpr_context):
Inherited Members
M_Pattern
match
class MSub(Moperator):
Inherited Members
M_Pattern
match
class MSubscript(Mexpr):
MSubscript( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, slice: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, ctx: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MTry(Mstmt):
MTry( body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, handlers: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, orelse: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, finalbody: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MTuple(Mexpr):
MTuple( elts: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, ctx: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MTypeIgnore(Mtype_ignore):
MTypeIgnore( lineno: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, tag: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MUAdd(Munaryop):
Inherited Members
M_Pattern
match
class MUSub(Munaryop):
Inherited Members
M_Pattern
match
class MUnaryOp(Mexpr):
MUnaryOp( op: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, operand: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MWhile(Mstmt):
MWhile( test: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, orelse: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MWith(Mstmt):
MWith( items: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_comment: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MYield(Mexpr):
MYield( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MYieldFrom(Mexpr):
MYieldFrom( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class Malias(MAST):
Malias( name: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, asname: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class Marg(MAST):
Marg( arg: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, annotation: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_comment: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class Marguments(MAST):

This works like all the other match pattern classes except that it has an extra _strict parameter which controls how it matches against individual arguments._all. This parameter can also be set on a normal AST arguments class for the same effect.

Parameters:

  • _strict: Set this to control matching, if not set defaults to False.
    • True: posonlyargs only match to posonlyargs, kwonlyargs to kwonlyargs and args only to args. Their associated defaults only match to the same type of default as well.
    • False: Same as True except that args in the pattern matches to args, posonlyargs or kwonlyargs in the target and defaults likewise can also match to kw_defaults. This allows the use of the standard args to search in all the args fields.
    • None: All types of args and defaults can match to each other.
Marguments( posonlyargs: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, args: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, vararg: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, kwonlyargs: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, kw_defaults: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, kwarg: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, defaults: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _all: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _strict: bool | None = False)
Inherited Members
M_Pattern
match
class Mboolop(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class Mcmpop(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class Mcomprehension(MAST):
Mcomprehension( target: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, iter: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, ifs: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, is_async: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class Mexcepthandler(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class Mexpr(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class Mexpr_context(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class Mkeyword(MAST):
Mkeyword( arg: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class Mmatch_case(MAST):
Mmatch_case( pattern: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, guard: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class Mmod(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class Moperator(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class Mpattern(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class Mstmt(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class Mtype_ignore(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class Munaryop(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class Mwithitem(MAST):
Mwithitem( context_expr: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, optional_vars: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MTryStar(Mstmt):
MTryStar( body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, handlers: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, orelse: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, finalbody: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, _body: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MTypeAlias(Mstmt):
MTypeAlias( name: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, type_params: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class Mtype_param(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class MTypeVar(Mtype_param):
MTypeVar( name: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, bound: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, default_value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MParamSpec(Mtype_param):
MParamSpec( name: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, default_value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MTypeVarTuple(Mtype_param):
MTypeVarTuple( name: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, default_value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MTemplateStr(Mexpr):
MTemplateStr( values: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class MInterpolation(Mexpr):
MInterpolation( value: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, str: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, conversion: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis, format_spec: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class M_slice(MAST):
Inherited Members
MAST
MAST
M_Pattern
match
class M_ExceptHandlers(M_slice):
M_ExceptHandlers( handlers: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class M_match_cases(M_slice):
M_match_cases( cases: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class M_Assign_targets(M_slice):
M_Assign_targets( targets: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class M_decorator_list(M_slice):
M_decorator_list( decorator_list: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class M_arglikes(M_slice):
M_arglikes( arglikes: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class M_comprehensions(M_slice):
M_comprehensions( generators: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class M_comprehension_ifs(M_slice):
M_comprehension_ifs( ifs: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class M_aliases(M_slice):
M_aliases( names: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class M_withitems(M_slice):
M_withitems( items: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match
class M_type_params(M_slice):
M_type_params( type_params: Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType, list[Union[M_Pattern, ast.AST, type[Union[M_Pattern, ast.AST]], re.Pattern, str, ellipsis, int, float, complex, bytes, bool, NoneType]]] = Ellipsis)
Inherited Members
M_Pattern
match