[Python-checkins] gh-98879: Remove unreachable error case from COMPARE_OP_STR_JUMP (GH-98882)
sweeneyde
webhook-mailer at python.org
Sun Oct 30 19:07:17 EDT 2022
https://github.com/python/cpython/commit/87b5fd9d9de11c68b9940d3a1dba902138129109
commit: 87b5fd9d9de11c68b9940d3a1dba902138129109
branch: main
author: Dennis Sweeney <36520290+sweeneyde at users.noreply.github.com>
committer: sweeneyde <36520290+sweeneyde at users.noreply.github.com>
date: 2022-10-30T19:07:11-04:00
summary:
gh-98879: Remove unreachable error case from COMPARE_OP_STR_JUMP (GH-98882)
Thanks to PEP 623 changes, the comparison cannot fail.
files:
M Python/ceval.c
diff --git a/Python/ceval.c b/Python/ceval.c
index 24af419d29c5..f2250ffbc71f 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3420,9 +3420,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
DEOPT_IF(!PyUnicode_CheckExact(right), COMPARE_OP);
STAT_INC(COMPARE_OP, hit);
int res = _PyUnicode_Equal(left, right);
- if (res < 0) {
- goto error;
- }
assert(oparg == Py_EQ || oparg == Py_NE);
JUMPBY(INLINE_CACHE_ENTRIES_COMPARE_OP);
NEXTOPARG();
More information about the Python-checkins
mailing list