You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
40 lines
524 B
Python
40 lines
524 B
Python
# Ensures opcodes DELETE_SUBSCR and DELETE_GLOBAL are covered
|
|
a = (1, 2, 3)
|
|
# DELETE_NAME
|
|
del a
|
|
|
|
# DELETE_SUBSCR
|
|
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]
|
|
|
|
d = [0,1,2,3,4,5,6]
|
|
del d[1:3:2]
|
|
|
|
e = ('a', 'b')
|
|
def foo():
|
|
# covers DELETE_GLOBAL
|
|
global e
|
|
del e
|
|
|
|
z = {}
|
|
|
|
def a():
|
|
b =1
|
|
global z
|
|
del z
|
|
def b(y):
|
|
global z
|
|
# covers DELETE_FAST
|
|
del y
|
|
# LOAD_DEREF
|
|
return z
|