diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-10-11 16:22:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 16:22:04 (GMT) |
commit | 9b12084aca1a2072f0333dbc562e52d8dc0235bd (patch) | |
tree | 1c28ebd9470e9714abf13e19bc4b2037ee590183 /Doc | |
parent | 9d44ca51830ea1ead1e6e5641f9dc22fa108e2dc (diff) | |
download | cpython-9b12084aca1a2072f0333dbc562e52d8dc0235bd.zip cpython-9b12084aca1a2072f0333dbc562e52d8dc0235bd.tar.gz cpython-9b12084aca1a2072f0333dbc562e52d8dc0235bd.tar.bz2 |
gh-98172: Fix formatting in `except*` docs (GH-98173)
(cherry picked from commit 5ecf961640192a2192383aa20e1e93dcdf23c9b6)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Doc')
-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:: |