RustPython-Parser/parser/src/snapshots/rustpython_parser__parser__tests__patma.snap
2023-05-10 19:33:39 +09:00

5285 lines
275 KiB
Text
Generated

---
source: parser/src/parser.rs
expression: parse_ast
---
[
Attributed {
range: 67..103,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 73..74,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 85..88,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 85..88,
custom: (),
node: UnaryOp(
ExprUnaryOp {
op: USub,
operand: Attributed {
range: 86..88,
custom: (),
node: Constant(
ExprConstant {
value: Complex {
real: 0.0,
imag: 0.0,
},
kind: None,
},
),
},
},
),
},
},
),
},
guard: None,
body: [
Attributed {
range: 98..103,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 98..99,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 102..103,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 126..167,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 132..133,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 144..152,
custom: (),
node: MatchClass(
PatternMatchClass {
cls: Attributed {
range: 144..149,
custom: (),
node: Name(
ExprName {
id: Identifier(
"bytes",
),
ctx: Load,
},
),
},
patterns: [
Attributed {
range: 150..151,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: None,
name: Some(
Identifier(
"z",
),
),
},
),
},
],
kwd_attrs: [],
kwd_patterns: [],
},
),
},
guard: None,
body: [
Attributed {
range: 162..167,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 162..163,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 166..167,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 190..260,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 196..197,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 208..209,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 208..209,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
guard: Some(
Attributed {
range: 213..214,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
),
body: [
Attributed {
range: 224..229,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 224..225,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 228..229,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 239..240,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 239..240,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
guard: Some(
Attributed {
range: 244..245,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
),
body: [
Attributed {
range: 255..260,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 255..256,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 259..260,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 283..332,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 289..290,
custom: (),
node: Constant(
ExprConstant {
value: Int(
3,
),
kind: None,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 301..314,
custom: (),
node: MatchOr(
PatternMatchOr {
patterns: [
Attributed {
range: 301..302,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 301..302,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 305..306,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 305..306,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 309..310,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 309..310,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 313..314,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 313..314,
custom: (),
node: Constant(
ExprConstant {
value: Int(
3,
),
kind: None,
},
),
},
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 324..332,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 324..325,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 328..332,
custom: (),
node: Constant(
ExprConstant {
value: Bool(
true,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 355..403,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 361..362,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 373..388,
custom: (),
node: MatchOr(
PatternMatchOr {
patterns: [
Attributed {
range: 373..379,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 374..375,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 374..375,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 377..378,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 377..378,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
],
},
),
},
Attributed {
range: 382..388,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 383..384,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 383..384,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 386..387,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 386..387,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
],
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 398..403,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 398..399,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 402..403,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 445..523,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 451..452,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 463..467,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 464..466,
custom: (),
node: MatchStar(
PatternMatchStar {
name: None,
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 477..489,
custom: (),
node: Return(
StmtReturn {
value: Some(
Attributed {
range: 484..489,
custom: (),
node: Constant(
ExprConstant {
value: Str(
"seq",
),
kind: None,
},
),
},
),
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 499..501,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [],
patterns: [],
rest: None,
},
),
},
guard: None,
body: [
Attributed {
range: 511..523,
custom: (),
node: Return(
StmtReturn {
value: Some(
Attributed {
range: 518..523,
custom: (),
node: Constant(
ExprConstant {
value: Str(
"map",
),
kind: None,
},
),
},
),
},
),
},
],
},
],
},
),
},
Attributed {
range: 546..714,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 552..553,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 564..579,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [
Attributed {
range: 565..566,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
],
patterns: [
Attributed {
range: 568..578,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 569..570,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 569..570,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 572..573,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 572..573,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 575..577,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [],
patterns: [],
rest: None,
},
),
},
],
},
),
},
],
rest: None,
},
),
},
guard: None,
body: [
Attributed {
range: 589..594,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 589..590,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 593..594,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 604..672,
custom: (),
node: MatchOr(
PatternMatchOr {
patterns: [
Attributed {
range: 604..626,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [
Attributed {
range: 605..606,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
],
patterns: [
Attributed {
range: 608..625,
custom: (),
node: MatchOr(
PatternMatchOr {
patterns: [
Attributed {
range: 608..618,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 609..610,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 609..610,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 612..613,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 612..613,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 615..617,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [],
patterns: [],
rest: None,
},
),
},
],
},
),
},
Attributed {
range: 621..625,
custom: (),
node: MatchSingleton(
PatternMatchSingleton {
value: Bool(
true,
),
},
),
},
],
},
),
},
],
rest: None,
},
),
},
Attributed {
range: 629..638,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [
Attributed {
range: 630..631,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
],
patterns: [
Attributed {
range: 633..637,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 634..636,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [],
},
),
},
],
},
),
},
],
rest: None,
},
),
},
Attributed {
range: 641..656,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [
Attributed {
range: 642..643,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
],
patterns: [
Attributed {
range: 645..655,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 646..647,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 646..647,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 649..650,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 649..650,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 652..654,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [],
patterns: [],
rest: None,
},
),
},
],
},
),
},
],
rest: None,
},
),
},
Attributed {
range: 659..661,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [],
},
),
},
Attributed {
range: 664..667,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 664..667,
custom: (),
node: Constant(
ExprConstant {
value: Str(
"X",
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 670..672,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [],
patterns: [],
rest: None,
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 682..687,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 682..683,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 686..687,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 697..699,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [],
},
),
},
guard: None,
body: [
Attributed {
range: 709..714,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 709..710,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 713..714,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 737..782,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 743..744,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 755..767,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 755..767,
custom: (),
node: BinOp(
ExprBinOp {
left: Attributed {
range: 755..759,
custom: (),
node: Constant(
ExprConstant {
value: Float(
0.25,
),
kind: None,
},
),
},
op: Add,
right: Attributed {
range: 762..767,
custom: (),
node: Constant(
ExprConstant {
value: Complex {
real: 0.0,
imag: 1.75,
},
kind: None,
},
),
},
},
),
},
},
),
},
guard: None,
body: [
Attributed {
range: 777..782,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 777..778,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 781..782,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 805..841,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 811..812,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 823..826,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 823..826,
custom: (),
node: UnaryOp(
ExprUnaryOp {
op: USub,
operand: Attributed {
range: 824..826,
custom: (),
node: Constant(
ExprConstant {
value: Complex {
real: 0.0,
imag: 0.0,
},
kind: None,
},
),
},
},
),
},
},
),
},
guard: None,
body: [
Attributed {
range: 836..841,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 836..837,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 840..841,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 864..913,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 870..871,
custom: (),
node: Constant(
ExprConstant {
value: Int(
4,
),
kind: None,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 882..895,
custom: (),
node: MatchOr(
PatternMatchOr {
patterns: [
Attributed {
range: 882..883,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 882..883,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 886..887,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 886..887,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 890..891,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 890..891,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 894..895,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 894..895,
custom: (),
node: Constant(
ExprConstant {
value: Int(
3,
),
kind: None,
},
),
},
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 905..913,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 905..906,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 909..913,
custom: (),
node: Constant(
ExprConstant {
value: Bool(
true,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 936..975,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 942..943,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 954..955,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 954..955,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
guard: Some(
Attributed {
range: 959..960,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
),
body: [
Attributed {
range: 970..975,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 970..971,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 974..975,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 998..1098,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1004..1005,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1016..1022,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [
Attributed {
range: 1017..1018,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
],
patterns: [
Attributed {
range: 1020..1021,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1020..1021,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
],
rest: None,
},
),
},
guard: None,
body: [
Attributed {
range: 1032..1037,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1032..1033,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1036..1037,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 1047..1053,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [
Attributed {
range: 1048..1049,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
],
patterns: [
Attributed {
range: 1051..1052,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1051..1052,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
],
rest: None,
},
),
},
guard: None,
body: [
Attributed {
range: 1063..1068,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1063..1064,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1067..1068,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 1078..1083,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [],
patterns: [],
rest: Some(
Identifier(
"z",
),
),
},
),
},
guard: None,
body: [
Attributed {
range: 1093..1098,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1093..1094,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1097..1098,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1121..1162,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1127..1132,
custom: (),
node: Call(
ExprCall {
func: Attributed {
range: 1127..1130,
custom: (),
node: Name(
ExprName {
id: Identifier(
"Seq",
),
ctx: Load,
},
),
},
args: [],
keywords: [],
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1143..1147,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 1144..1146,
custom: (),
node: MatchStar(
PatternMatchStar {
name: None,
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 1157..1162,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1157..1158,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1161..1162,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1185..1245,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1191..1192,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1203..1204,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1203..1204,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
guard: None,
body: [
Attributed {
range: 1214..1219,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1214..1215,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1218..1219,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 1229..1230,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1229..1230,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
guard: None,
body: [
Attributed {
range: 1240..1245,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1240..1241,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1244..1245,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1268..1315,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1274..1275,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1286..1298,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [
Attributed {
range: 1287..1292,
custom: (),
node: Constant(
ExprConstant {
value: Str(
"foo",
),
kind: None,
},
),
},
],
patterns: [
Attributed {
range: 1294..1297,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: None,
name: Some(
Identifier(
"bar",
),
),
},
),
},
],
rest: None,
},
),
},
guard: None,
body: [
Attributed {
range: 1308..1315,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1308..1309,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1312..1315,
custom: (),
node: Name(
ExprName {
id: Identifier(
"bar",
),
ctx: Load,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1338..1392,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1344..1353,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Attributed {
range: 1345..1346,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
Attributed {
range: 1348..1349,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
Attributed {
range: 1351..1352,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
],
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1364..1377,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 1365..1366,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1365..1366,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 1368..1369,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1368..1369,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 1371..1373,
custom: (),
node: MatchStar(
PatternMatchStar {
name: Some(
Identifier(
"x",
),
),
},
),
},
Attributed {
range: 1375..1376,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1375..1376,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 1387..1392,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1387..1388,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1391..1392,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1415..1529,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1421..1422,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1433..1436,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 1434..1435,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1434..1435,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 1446..1451,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1446..1447,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1450..1451,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 1461..1467,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 1462..1463,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1462..1463,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 1465..1466,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1465..1466,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
],
},
),
},
guard: Some(
Attributed {
range: 1472..1482,
custom: (),
node: NamedExpr(
ExprNamedExpr {
target: Attributed {
range: 1472..1473,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Store,
},
),
},
value: Attributed {
range: 1477..1482,
custom: (),
node: Subscript(
ExprSubscript {
value: Attributed {
range: 1477..1478,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
slice: Attributed {
range: 1479..1481,
custom: (),
node: Slice(
ExprSlice {
lower: None,
upper: Some(
Attributed {
range: 1480..1481,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
),
step: None,
},
),
},
ctx: Load,
},
),
},
},
),
},
),
body: [
Attributed {
range: 1493..1498,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1493..1494,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1497..1498,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 1508..1514,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 1509..1510,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1509..1510,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 1512..1513,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1512..1513,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 1524..1529,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1524..1525,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1528..1529,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1552..1595,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1558..1559,
custom: (),
node: Name(
ExprName {
id: Identifier(
"w",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1570..1580,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 1571..1572,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: None,
name: Some(
Identifier(
"x",
),
),
},
),
},
Attributed {
range: 1574..1575,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: None,
name: Some(
Identifier(
"y",
),
),
},
),
},
Attributed {
range: 1577..1579,
custom: (),
node: MatchStar(
PatternMatchStar {
name: None,
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 1590..1595,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1590..1591,
custom: (),
node: Name(
ExprName {
id: Identifier(
"z",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1594..1595,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1618..1664,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1624..1625,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1636..1649,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1636..1649,
custom: (),
node: BinOp(
ExprBinOp {
left: Attributed {
range: 1636..1641,
custom: (),
node: UnaryOp(
ExprUnaryOp {
op: USub,
operand: Attributed {
range: 1637..1641,
custom: (),
node: Constant(
ExprConstant {
value: Float(
0.25,
),
kind: None,
},
),
},
},
),
},
op: Sub,
right: Attributed {
range: 1644..1649,
custom: (),
node: Constant(
ExprConstant {
value: Complex {
real: 0.0,
imag: 1.75,
},
kind: None,
},
),
},
},
),
},
},
),
},
guard: None,
body: [
Attributed {
range: 1659..1664,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1659..1660,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1663..1664,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1687..1726,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1693..1697,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Attributed {
range: 1694..1695,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
],
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1708..1711,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 1709..1710,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: None,
name: Some(
Identifier(
"y",
),
),
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 1721..1726,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1721..1722,
custom: (),
node: Name(
ExprName {
id: Identifier(
"z",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1725..1726,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1749..1789,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1755..1756,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1767..1774,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1767..1774,
custom: (),
node: Attribute(
ExprAttribute {
value: Attributed {
range: 1767..1772,
custom: (),
node: Attribute(
ExprAttribute {
value: Attributed {
range: 1767..1770,
custom: (),
node: Attribute(
ExprAttribute {
value: Attributed {
range: 1767..1768,
custom: (),
node: Name(
ExprName {
id: Identifier(
"A",
),
ctx: Load,
},
),
},
attr: Identifier(
"B",
),
ctx: Load,
},
),
},
attr: Identifier(
"C",
),
ctx: Load,
},
),
},
attr: Identifier(
"D",
),
ctx: Load,
},
),
},
},
),
},
guard: None,
body: [
Attributed {
range: 1784..1789,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1784..1785,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1788..1789,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1812..1849,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1818..1819,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1830..1834,
custom: (),
node: MatchSingleton(
PatternMatchSingleton {
value: None,
},
),
},
guard: None,
body: [
Attributed {
range: 1844..1849,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1844..1845,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1848..1849,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1872..1906,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1878..1879,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1890..1891,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 1890..1891,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
guard: None,
body: [
Attributed {
range: 1901..1906,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1901..1902,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1905..1906,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1929..1967,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1935..1936,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 1947..1952,
custom: (),
node: MatchSingleton(
PatternMatchSingleton {
value: Bool(
false,
),
},
),
},
guard: None,
body: [
Attributed {
range: 1962..1967,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 1962..1963,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 1966..1967,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 1990..2081,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 1996..1997,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 2008..2010,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [],
},
),
},
guard: None,
body: [
Attributed {
range: 2020..2025,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2020..2021,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2024..2025,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 2035..2039,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 2036..2038,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2036..2038,
custom: (),
node: Constant(
ExprConstant {
value: Str(
"",
),
kind: None,
},
),
},
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 2049..2054,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2049..2050,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2053..2054,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 2064..2066,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2064..2066,
custom: (),
node: Constant(
ExprConstant {
value: Str(
"",
),
kind: None,
},
),
},
},
),
},
guard: None,
body: [
Attributed {
range: 2076..2081,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2076..2077,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2080..2081,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 2104..2138,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 2110..2111,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 2122..2123,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: None,
name: Some(
Identifier(
"z",
),
),
},
),
},
guard: None,
body: [
Attributed {
range: 2133..2138,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2133..2134,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2137..2138,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 2161..2207,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 2167..2168,
custom: (),
node: Name(
ExprName {
id: Identifier(
"w",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 2179..2192,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 2180..2181,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: None,
name: Some(
Identifier(
"x",
),
),
},
),
},
Attributed {
range: 2183..2184,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: None,
name: Some(
Identifier(
"y",
),
),
},
),
},
Attributed {
range: 2186..2191,
custom: (),
node: MatchStar(
PatternMatchStar {
name: Some(
Identifier(
"rest",
),
),
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 2202..2207,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2202..2203,
custom: (),
node: Name(
ExprName {
id: Identifier(
"z",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2206..2207,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 2230..2307,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 2236..2237,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 2248..2278,
custom: (),
node: MatchOr(
PatternMatchOr {
patterns: [
Attributed {
range: 2248..2256,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: Some(
Attributed {
range: 2249..2250,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2249..2250,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
),
name: Some(
Identifier(
"z",
),
),
},
),
},
Attributed {
range: 2259..2267,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: Some(
Attributed {
range: 2260..2261,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2260..2261,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
),
name: Some(
Identifier(
"z",
),
),
},
),
},
Attributed {
range: 2270..2278,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: Some(
Attributed {
range: 2271..2272,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2271..2272,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
},
),
},
),
name: Some(
Identifier(
"z",
),
),
},
),
},
],
},
),
},
guard: Some(
Attributed {
range: 2282..2292,
custom: (),
node: Compare(
ExprCompare {
left: Attributed {
range: 2282..2283,
custom: (),
node: Name(
ExprName {
id: Identifier(
"z",
),
ctx: Load,
},
),
},
ops: [
Eq,
],
comparators: [
Attributed {
range: 2287..2292,
custom: (),
node: BinOp(
ExprBinOp {
left: Attributed {
range: 2287..2288,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
op: Mod,
right: Attributed {
range: 2291..2292,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
},
),
},
],
},
),
},
),
body: [
Attributed {
range: 2302..2307,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2302..2303,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2306..2307,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 2330..2499,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 2336..2337,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 2348..2363,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [
Attributed {
range: 2349..2350,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
],
patterns: [
Attributed {
range: 2352..2362,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 2353..2354,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2353..2354,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 2356..2357,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2356..2357,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 2359..2361,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [],
patterns: [],
rest: None,
},
),
},
],
},
),
},
],
rest: None,
},
),
},
guard: None,
body: [
Attributed {
range: 2373..2378,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2373..2374,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2377..2378,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 2388..2457,
custom: (),
node: MatchOr(
PatternMatchOr {
patterns: [
Attributed {
range: 2388..2411,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [
Attributed {
range: 2389..2390,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
],
patterns: [
Attributed {
range: 2392..2410,
custom: (),
node: MatchOr(
PatternMatchOr {
patterns: [
Attributed {
range: 2392..2402,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 2393..2394,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2393..2394,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 2396..2397,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2396..2397,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 2399..2401,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [],
patterns: [],
rest: None,
},
),
},
],
},
),
},
Attributed {
range: 2405..2410,
custom: (),
node: MatchSingleton(
PatternMatchSingleton {
value: Bool(
false,
),
},
),
},
],
},
),
},
],
rest: None,
},
),
},
Attributed {
range: 2414..2423,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [
Attributed {
range: 2415..2416,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
],
patterns: [
Attributed {
range: 2418..2422,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 2419..2421,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [],
},
),
},
],
},
),
},
],
rest: None,
},
),
},
Attributed {
range: 2426..2441,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [
Attributed {
range: 2427..2428,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
],
patterns: [
Attributed {
range: 2430..2440,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 2431..2432,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2431..2432,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 2434..2435,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2434..2435,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 2437..2439,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [],
patterns: [],
rest: None,
},
),
},
],
},
),
},
],
rest: None,
},
),
},
Attributed {
range: 2444..2446,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [],
},
),
},
Attributed {
range: 2449..2452,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2449..2452,
custom: (),
node: Constant(
ExprConstant {
value: Str(
"X",
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 2455..2457,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [],
patterns: [],
rest: None,
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 2467..2472,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2467..2468,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2471..2472,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
MatchCase {
pattern: Attributed {
range: 2482..2484,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [],
},
),
},
guard: None,
body: [
Attributed {
range: 2494..2499,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2494..2495,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2498..2499,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 2522..2568,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 2528..2537,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Attributed {
range: 2529..2530,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
Attributed {
range: 2532..2533,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
Attributed {
range: 2535..2536,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
],
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 2548..2553,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 2548..2549,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2548..2549,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
},
),
},
Attributed {
range: 2551..2553,
custom: (),
node: MatchStar(
PatternMatchStar {
name: Some(
Identifier(
"x",
),
),
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 2563..2568,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2563..2564,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2567..2568,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 2591..2638,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 2597..2606,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Attributed {
range: 2598..2599,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
Attributed {
range: 2601..2602,
custom: (),
node: Constant(
ExprConstant {
value: Int(
1,
),
kind: None,
},
),
},
Attributed {
range: 2604..2605,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
],
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 2617..2623,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 2617..2619,
custom: (),
node: MatchStar(
PatternMatchStar {
name: Some(
Identifier(
"x",
),
),
},
),
},
Attributed {
range: 2621..2622,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Attributed {
range: 2621..2622,
custom: (),
node: Constant(
ExprConstant {
value: Int(
2,
),
kind: None,
},
),
},
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 2633..2638,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2633..2634,
custom: (),
node: Name(
ExprName {
id: Identifier(
"y",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2637..2638,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 2661..2697,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 2667..2668,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 2680..2682,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 2680..2681,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: None,
name: Some(
Identifier(
"y",
),
),
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 2692..2697,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2692..2693,
custom: (),
node: Name(
ExprName {
id: Identifier(
"z",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2696..2697,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 2720..2760,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 2720..2760,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Attributed {
range: 2726..2727,
custom: (),
node: Name(
ExprName {
id: Identifier(
"w",
),
ctx: Load,
},
),
},
Attributed {
range: 2729..2730,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
],
ctx: Load,
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 2741..2745,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 2741..2742,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: None,
name: Some(
Identifier(
"y",
),
),
},
),
},
Attributed {
range: 2744..2745,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: None,
name: Some(
Identifier(
"z",
),
),
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 2755..2760,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2755..2756,
custom: (),
node: Name(
ExprName {
id: Identifier(
"v",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2759..2760,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
Attributed {
range: 2783..2829,
custom: (),
node: Match(
StmtMatch {
subject: Attributed {
range: 2789..2795,
custom: (),
node: NamedExpr(
ExprNamedExpr {
target: Attributed {
range: 2789..2790,
custom: (),
node: Name(
ExprName {
id: Identifier(
"w",
),
ctx: Store,
},
),
},
value: Attributed {
range: 2794..2795,
custom: (),
node: Name(
ExprName {
id: Identifier(
"x",
),
ctx: Load,
},
),
},
},
),
},
cases: [
MatchCase {
pattern: Attributed {
range: 2807..2814,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Attributed {
range: 2807..2813,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: Some(
Attributed {
range: 2807..2808,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: None,
name: Some(
Identifier(
"y",
),
),
},
),
},
),
name: Some(
Identifier(
"v",
),
),
},
),
},
],
},
),
},
guard: None,
body: [
Attributed {
range: 2824..2829,
custom: (),
node: Assign(
StmtAssign {
targets: [
Attributed {
range: 2824..2825,
custom: (),
node: Name(
ExprName {
id: Identifier(
"z",
),
ctx: Store,
},
),
},
],
value: Attributed {
range: 2828..2829,
custom: (),
node: Constant(
ExprConstant {
value: Int(
0,
),
kind: None,
},
),
},
type_comment: None,
},
),
},
],
},
],
},
),
},
]