Skip to content

Commit b0a7b99

Browse files
Apply suggestions from code review
Co-authored-by: Erlend E. Aasland <[email protected]>
1 parent 5bc11a2 commit b0a7b99

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Doc/c-api/exceptions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -774,11 +774,11 @@ Exception Objects
774774
775775
.. c:function:: PyObject* PyUnstable_Exc_PrepReraiseStar(PyObject *orig, PyObject *excs)
776776
777-
Implements part of the interpreter's implementation of :keyword:`!except*`.
777+
Implement part of the interpreter's implementation of :keyword:`!except*`.
778778
*orig* is the original exception that was caught, and *excs* is the list of
779779
the exceptions that need to be raised. This list contains the the unhandled
780-
part of orig, if any, as well as the exceptions that were raised from the
781-
``except*`` clauses (so they have a different traceback from *orig*) and
780+
part of *orig*, if any, as well as the exceptions that were raised from the
781+
:keyword:`!except*` clauses (so they have a different traceback from *orig*) and
782782
those that were reraised (and have the same traceback as *orig*).
783783
Return the :exc:`ExceptionGroup` that needs to be reraised in the end, or
784784
``None`` if there is nothing to reraise.

Objects/exceptions.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,10 +1464,9 @@ PyUnstable_Exc_PrepReraiseStar(PyObject *orig, PyObject *excs)
14641464
}
14651465

14661466
/* Make sure that orig has something as traceback, in the interpreter
1467-
* it always does becuase it's a raised exception).
1467+
* it always does becuase it's a raised exception.
14681468
*/
14691469
PyObject *tb = PyException_GetTraceback(orig);
1470-
assert(tb == NULL || !Py_IsNone(tb));
14711470

14721471
if (tb == NULL) {
14731472
PyErr_Format(PyExc_ValueError, "orig must be a raised exception");

0 commit comments

Comments
 (0)