KOS_OP_MATCH_FIELD_POS_VAR / KOS_OP_MATCH_FIELD_POS_FAST
Style: EXTRA (LABEL, VAR, RAW) on
MATCH_FIELD_POS_VAR, (LABEL, FASTVAR, RAW) onMATCH_FIELD_POS_FAST: label, class, position.Stack:
[..., o]->[..., o, a]; jump toa0with nothing pushed on a miss.Semantics: Push the attribute of
o, read throughDatum, that__match_args__[a2]of the class in the variablea1names; the variable is read by name on the_VARform and by fast index on the_FASTform. A missing attribute is a miss. A class with no__match_args__, a__match_args__that is not a tuple, a position past its end, or an entry that is not astrraisesTypeError. On Python 3.9 a dataclass or named tuple without__match_args__reads the equivalent tuple Python 3.10 would generate.Compiler form: Emitted by the match compiler for each positional field of a class pattern; the
_VARform pre-compile, the_FASTtwin onceconvert_fasthas lowered the variable.