diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-03-11 09:07:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-11 09:07:06 (GMT) |
commit | e2732d3e66eba9ec13f9d55c499f2437ead552db (patch) | |
tree | 010be14ab95b6e68ee25a9369496532a9aa2129c /Lib/test/test_dis.py | |
parent | 3f7e9aa2ef215917b9f1521441f67f4ecd33a1bc (diff) | |
download | cpython-e2732d3e66eba9ec13f9d55c499f2437ead552db.zip cpython-e2732d3e66eba9ec13f9d55c499f2437ead552db.tar.gz cpython-e2732d3e66eba9ec13f9d55c499f2437ead552db.tar.bz2 |
bpo-32970: Improve disassembly of the MAKE_FUNCTION instruction. (GH-5937)
Diffstat (limited to 'Lib/test/test_dis.py')
-rw-r--r-- | Lib/test/test_dis.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py index 08393f7..098367c 100644 --- a/Lib/test/test_dis.py +++ b/Lib/test/test_dis.py @@ -348,7 +348,7 @@ dis_nested_0 = """\ 2 BUILD_TUPLE 1 4 LOAD_CONST 1 (<code object foo at 0x..., file "%s", line %d>) 6 LOAD_CONST 2 ('_h.<locals>.foo') - 8 MAKE_FUNCTION 8 + 8 MAKE_FUNCTION 8 (closure) 10 STORE_FAST 1 (foo) %3d 12 LOAD_FAST 1 (foo) @@ -365,7 +365,7 @@ Disassembly of <code object foo at 0x..., file "%s", line %d>: 2 BUILD_TUPLE 1 4 LOAD_CONST 1 (<code object <listcomp> at 0x..., file "%s", line %d>) 6 LOAD_CONST 2 ('_h.<locals>.foo.<locals>.<listcomp>') - 8 MAKE_FUNCTION 8 + 8 MAKE_FUNCTION 8 (closure) 10 LOAD_DEREF 1 (y) 12 GET_ITER 14 CALL_FUNCTION 1 @@ -862,7 +862,7 @@ expected_opinfo_outer = [ Instruction(opname='BUILD_TUPLE', opcode=102, arg=2, argval=2, argrepr='', offset=6, starts_line=None, is_jump_target=False), Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=code_object_f, argrepr=repr(code_object_f), offset=8, starts_line=None, is_jump_target=False), Instruction(opname='LOAD_CONST', opcode=100, arg=4, argval='outer.<locals>.f', argrepr="'outer.<locals>.f'", offset=10, starts_line=None, is_jump_target=False), - Instruction(opname='MAKE_FUNCTION', opcode=132, arg=9, argval=9, argrepr='', offset=12, starts_line=None, is_jump_target=False), + Instruction(opname='MAKE_FUNCTION', opcode=132, arg=9, argval=9, argrepr='defaults, closure', offset=12, starts_line=None, is_jump_target=False), Instruction(opname='STORE_FAST', opcode=125, arg=2, argval='f', argrepr='f', offset=14, starts_line=None, is_jump_target=False), Instruction(opname='LOAD_GLOBAL', opcode=116, arg=0, argval='print', argrepr='print', offset=16, starts_line=7, is_jump_target=False), Instruction(opname='LOAD_DEREF', opcode=136, arg=0, argval='a', argrepr='a', offset=18, starts_line=None, is_jump_target=False), @@ -887,7 +887,7 @@ expected_opinfo_f = [ Instruction(opname='BUILD_TUPLE', opcode=102, arg=4, argval=4, argrepr='', offset=10, starts_line=None, is_jump_target=False), Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=code_object_inner, argrepr=repr(code_object_inner), offset=12, starts_line=None, is_jump_target=False), Instruction(opname='LOAD_CONST', opcode=100, arg=4, argval='outer.<locals>.f.<locals>.inner', argrepr="'outer.<locals>.f.<locals>.inner'", offset=14, starts_line=None, is_jump_target=False), - Instruction(opname='MAKE_FUNCTION', opcode=132, arg=9, argval=9, argrepr='', offset=16, starts_line=None, is_jump_target=False), + Instruction(opname='MAKE_FUNCTION', opcode=132, arg=9, argval=9, argrepr='defaults, closure', offset=16, starts_line=None, is_jump_target=False), Instruction(opname='STORE_FAST', opcode=125, arg=2, argval='inner', argrepr='inner', offset=18, starts_line=None, is_jump_target=False), Instruction(opname='LOAD_GLOBAL', opcode=116, arg=0, argval='print', argrepr='print', offset=20, starts_line=5, is_jump_target=False), Instruction(opname='LOAD_DEREF', opcode=136, arg=2, argval='a', argrepr='a', offset=22, starts_line=None, is_jump_target=False), |