summaryrefslogtreecommitdiffstats
path: root/Lib/opcode.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2020-12-17 13:55:28 (GMT)
committerGitHub <noreply@github.com>2020-12-17 13:55:28 (GMT)
commitbf353f3c2d937772a8cf30b15fd8eb7b82665ccb (patch)
tree9196732769c1cca2bd01a44e668fe4c5fb29f7d7 /Lib/opcode.py
parent40125ab3252453bf205ed906e46bf9741c27bf9d (diff)
downloadcpython-bf353f3c2d937772a8cf30b15fd8eb7b82665ccb.zip
cpython-bf353f3c2d937772a8cf30b15fd8eb7b82665ccb.tar.gz
cpython-bf353f3c2d937772a8cf30b15fd8eb7b82665ccb.tar.bz2
bpo-42246: Make sure that `f_lasti`, and thus `f_lineno`, is set correctly after raising or reraising an exception (GH-23803)
* Ensure that f_lasti is set correctly after an exception is raised to conform to PEP 626. * Update importlib * Add NEWS.
Diffstat (limited to 'Lib/opcode.py')
-rw-r--r--Lib/opcode.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/opcode.py b/Lib/opcode.py
index ac1aa53..cc32116 100644
--- a/Lib/opcode.py
+++ b/Lib/opcode.py
@@ -83,7 +83,6 @@ def_op('BINARY_TRUE_DIVIDE', 27)
def_op('INPLACE_FLOOR_DIVIDE', 28)
def_op('INPLACE_TRUE_DIVIDE', 29)
-def_op('RERAISE', 48)
def_op('WITH_EXCEPT_START', 49)
def_op('GET_AITER', 50)
def_op('GET_ANEXT', 51)
@@ -161,6 +160,7 @@ name_op('LOAD_GLOBAL', 116) # Index in name list
def_op('IS_OP', 117)
def_op('CONTAINS_OP', 118)
+def_op('RERAISE', 119)
jabs_op('JUMP_IF_NOT_EXC_MATCH', 121)
jrel_op('SETUP_FINALLY', 122) # Distance to target address