diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2022-10-11 16:13:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 16:13:56 (GMT) |
commit | 5ecf961640192a2192383aa20e1e93dcdf23c9b6 (patch) | |
tree | a038c85ac67814e55e493e4552636a082993522f | |
parent | df3a6d9beb8a7a3fe87a6d4126384fd3e0213853 (diff) | |
download | cpython-5ecf961640192a2192383aa20e1e93dcdf23c9b6.zip cpython-5ecf961640192a2192383aa20e1e93dcdf23c9b6.tar.gz cpython-5ecf961640192a2192383aa20e1e93dcdf23c9b6.tar.bz2 |
gh-98172: Fix formatting in `except*` docs (#98173)
-rw-r--r-- | Doc/reference/compound_stmts.rst | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index d914686..89634818 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -363,18 +363,17 @@ one :keyword:`!except*` clause, the first that matches it. :: +-+---------------- 1 ---------------- | ValueError: 1 +------------------------------------ - >>> - - Any remaining exceptions that were not handled by any :keyword:`!except*` - clause are re-raised at the end, combined into an exception group along with - all exceptions that were raised from within :keyword:`!except*` clauses. - - An :keyword:`!except*` clause must have a matching type, - and this type cannot be a subclass of :exc:`BaseExceptionGroup`. - It is not possible to mix :keyword:`except` and :keyword:`!except*` - in the same :keyword:`try`. - :keyword:`break`, :keyword:`continue` and :keyword:`return` - cannot appear in an :keyword:`!except*` clause. + +Any remaining exceptions that were not handled by any :keyword:`!except*` +clause are re-raised at the end, combined into an exception group along with +all exceptions that were raised from within :keyword:`!except*` clauses. + +An :keyword:`!except*` clause must have a matching type, +and this type cannot be a subclass of :exc:`BaseExceptionGroup`. +It is not possible to mix :keyword:`except` and :keyword:`!except*` +in the same :keyword:`try`. +:keyword:`break`, :keyword:`continue` and :keyword:`return` +cannot appear in an :keyword:`!except*` clause. .. index:: |