Add global statements even for read of globals

This commit is contained in:
rocky
2017-12-02 19:13:11 -05:00
parent ec9d00a34d
commit 5ae32de709
6 changed files with 32 additions and 7 deletions

View File

@@ -8,6 +8,10 @@ b = [4, 5, 6]
del b[1]
del b[:]
# del_stmt ::= expr expr DELETE_SLICE+1
l = [None] * 10
del l[-2:]
c = [0,1,2,3,4]
del c[:1]
del c[2:3]
@@ -22,8 +26,10 @@ def foo():
del e
def a():
b =1
del z
def b(y):
global z
# covers DELETE_FAST
del y
# LOAD_DEREF