Files
python-uncompyle6/test/decompyle/test_global.py
R. Bernstein 9b5d953614 Merge pull request #364 from rocky/PYTHON3-move
use xdis.PYTHON3 not uncompyle.PYTHON3
2021-11-03 01:24:47 -04:00

27 lines
482 B
Python

"""
test_global.py -- source test pattern for 'global' statement
This source is part of the decompyle test suite.
decompyle is a Python byte-code decompiler
See http://www.goebel-consult.de/decompyle/ for download and
for further information
"""
i = 1; j = 7
def a():
def b():
def c():
k = 34
global i
i = i+k
l = 42
c()
global j
j = j+l
b()
print i, j # should print 35, 49
a()
print i, j