Error handling of RERAISE
is strange
#122759
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-bug
An unexpected behavior, bug, or error
Uh oh!
There was an error while loading. Please reload this page.
Bug report
There's a strange pattern used in
RERAISE
opcode:cpython/Python/bytecodes.c
Lines 1174 to 1189 in 4767a6e
Especially these lines:
cpython/Python/bytecodes.c
Lines 1180 to 1187 in 4767a6e
It looks like the
assert
call is not needed here:PyLong_Check(lasti)
will always be falseSystemError
as it should be (at least, I think so). That's the only line that matchesr'assert\(.*\);\n\s+_PyErr'
I have a PR ready.
Linked PRs
assert
fromRERAISE
error handling #122760The text was updated successfully, but these errors were encountered: