mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Produce cleaner bytecode for 'with' and 'async with' by generating separate code for normal and exceptional paths. (#6641)
Remove BEGIN_FINALLY, END_FINALLY, CALL_FINALLY and POP_FINALLY bytecodes. Implement finally blocks by code duplication. Reimplement frame.lineno setter using line numbers rather than bytecode offsets.
This commit is contained in:
parent
5dcc06f6e0
commit
fee552669f
15 changed files with 4789 additions and 4754 deletions
|
|
@ -1431,7 +1431,7 @@ output.append(4)
|
|||
1 / 0
|
||||
|
||||
@jump_test(3, 2, [2], event='return', error=(ValueError,
|
||||
"can't jump from a yield statement"))
|
||||
"can't jump from a 'yield' statement"))
|
||||
def test_no_jump_from_yield(output):
|
||||
def gen():
|
||||
output.append(2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue