x = prev[prev[0]] # which prev ?
y = a / b / c # which divide is invalid?
[x[0] for i in d[j] if got[i] == e[i]] # lots going on here
exec("a=%s; b=y" % z) # code created at runtime
prev[prev[0]]
compiles to:
2 10 LOAD_NAME prev
12 LOAD_NAME prev
14 LOAD_CONST 0
16 BINARY_SUBSCR
18 BINARY_SUBSCR
20 POP_TOP
sentence
0. subject
pronoun, first person
I
1. verb, past tense
ate
2. object
noun phrase
0. definite article
the
1. noun
mango
3. punctuation
.
stmts (4)
...
1. stmt
0. expr
binary_subscr
0. expr
L. 2 10 LOAD_NAME 'prev'
1. expr
binary_subscr
0. expr
12 LOAD_NAME 'prev'
1. expr
14 LOAD_CONST 0
2. 16 BINARY_SUBSCR
2. 18 BINARY_SUBSCR
1. 20 POP_TOP
2 10 LOAD_NAME "prev"
12 LOAD_NAME "prev"
14 LOAD_CONST 0
16 BINARY_SUBSCR
18 BINARY_SUBSCR
when parsed becomes:
0. expr
binary_subscr
0. expr
L. 2 10 LOAD_NAME 'prev'
1. expr
binary_subscr
0. expr
12 LOAD_NAME 'prev'
1. expr
14 LOAD_CONST 0
2. 16 BINARY_SUBSCR
2. 18 BINARY_SUBSCR
...
instruction 16 BINARY_SUBSCR
prev[prev[0]]
-------
At offset 18:
instruction 18 BINARY_SUBSCR
prev[prev[0]]
-------------
This comes from the tree structure in the parse.
(/ a (/ b c)))
gives:
0 varref a
1 varref b
2 varref c
3 quo
4 quo
5 return