diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py index 3e747748720..902bcdd196e 100644 --- a/Lib/test/test_dis.py +++ b/Lib/test/test_dis.py @@ -827,7 +827,14 @@ Disassembly of : %4d RESUME 0 -%4d LOAD_GLOBAL 1 (list + NULL) +%4d LOAD_GLOBAL 0 (list) + COPY 1 + LOAD_COMMON_CONSTANT 5 (list) + IS_OP 0 (is) + POP_JUMP_IF_FALSE 22 (to L3) + NOT_TAKEN + POP_TOP + BUILD_LIST 0 LOAD_FAST_BORROW 0 (x) BUILD_TUPLE 1 LOAD_CONST %d ( at 0x..., file "%s", line %d>) @@ -835,6 +842,21 @@ Disassembly of : SET_FUNCTION_ATTRIBUTE 8 (closure) LOAD_DEREF 1 (y) CALL 0 + PUSH_NULL + L1: FOR_ITER 3 (to L2) + LIST_APPEND 3 + JUMP_BACKWARD 5 (to L1) + L2: END_FOR + POP_ITER + RETURN_VALUE + L3: PUSH_NULL + LOAD_FAST_BORROW 0 (x) + BUILD_TUPLE 1 + LOAD_CONST 1 ( at 0x..., file "%s", line %d>) + MAKE_FUNCTION + SET_FUNCTION_ATTRIBUTE 8 (closure) + LOAD_DEREF 1 (y) + CALL 0 CALL 1 RETURN_VALUE """ % (dis_nested_0, @@ -845,6 +867,8 @@ Disassembly of : 1 if __debug__ else 0, __file__, _h.__code__.co_firstlineno + 3, + __file__, + _h.__code__.co_firstlineno + 3, ) dis_nested_2 = """%s