Repository navigation
Source locations of comprehension bytecode are incorrect #98461
Copy link
Copy link
Closed
Labels
3.12only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errorinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)3.12only security fixesonly security fixes
on Oct 19, 2022 Correct output should be:
[((3, 3, 0, 0), 'RESUME', 0), ((3, 8, 2, 31), 'BUILD_LIST', 0), ((3, 8, 2, 31), 'LOAD_FAST', '.0'), ((3, 8, 2, 31), 'FOR_ITER', 64), ((5, 5, 7, 8), 'STORE_FAST', 'x'), ((6, 6, 18, 19), 'LOAD_FAST', 'x'), ((6, 6, 22, 23), 'LOAD_CONST', 0), ((6, 6, 18, 23), 'COMPARE_OP', '>'), ((6, 6, 18, 23), 'POP_JUMP_IF_FALSE', 62), ((7, 7, 22, 23), 'LOAD_FAST', 'x'), ((7, 7, 26, 29), 'LOAD_CONST', 100), ((7, 7, 22, 29), 'COMPARE_OP', '<'), ((7, 7, 22, 29), 'POP_JUMP_IF_FALSE', 62), ((8, 8, 22, 23), 'LOAD_FAST', 'x'), ((8, 8, 27, 29), 'LOAD_CONST', 50), ((8, 8, 22, 29), 'COMPARE_OP', '!='), ((8, 8, 22, 29), 'POP_JUMP_IF_FALSE', 62), ((3, 3, 4, 5), 'LOAD_FAST', 'x'), ((4, 4, 3, 4), 'LOAD_CONST', 2), ((4, 4, 5, 6), 'LOAD_FAST', 'x'), ((4, 4, 3, 6), 'BINARY_OP', 5), ((3, 4, 3, 7), 'BUILD_TUPLE', 2), ((3, 4, 3, 7), 'LIST_APPEND', 2), ((3, 4, 3, 7), 'JUMP_BACKWARD', 6), ((3, 8, 2, 31), 'RETURN_VALUE', None)]- added a commit that references this issue
on Oct 19, 2022 FYI @nedbat .
- changed the title
[-]Source location of comprehension bytecode are incorrect[/-][+]Source locations of comprehension bytecode are incorrect[/+]on Oct 20, 2022 - added a commit that references this issue
on Oct 20, 2022
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
The output is: