Skip to content

Commit 856049a

Browse files
Fix minor typos in 'Compound statements' docs (#149666)
Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent ea57037 commit 856049a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Doc/reference/compound_stmts.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,12 @@ and the exception occurs in the :keyword:`!try` clause of the inner handler,
279279
the outer handler will not handle the exception.)
280280

281281
When an exception has been assigned using ``as target``, it is cleared at the
282-
end of the :keyword:`!except` clause. This is as if ::
282+
end of the :keyword:`!except` clause. This is as if::
283283

284284
except E as N:
285285
foo
286286

287-
was translated to ::
287+
was translated to::
288288

289289
except E as N:
290290
try:
@@ -341,7 +341,7 @@ can have either :keyword:`except` or :keyword:`!except*` clauses, but not both.
341341
The exception type for matching is mandatory in the case of :keyword:`!except*`,
342342
so ``except*:`` is a syntax error. The type is interpreted as in the case of
343343
:keyword:`!except`, but matching is performed on the exceptions contained in the
344-
group that is being handled. An :exc:`TypeError` is raised if a matching
344+
group that is being handled. A :exc:`TypeError` is raised if a matching
345345
type is a subclass of :exc:`!BaseExceptionGroup`, because that would have
346346
ambiguous semantics.
347347

@@ -357,7 +357,7 @@ or the last :keyword:`!except*` clause has run.
357357

358358
After all :keyword:`!except*` clauses execute, the group of unhandled exceptions
359359
is merged with any exceptions that were raised or re-raised from within
360-
:keyword:`!except*` clauses. This merged exception group propagates on.::
360+
:keyword:`!except*` clauses. This merged exception group propagates on::
361361

362362
>>> try:
363363
... raise ExceptionGroup("eg",
@@ -1311,7 +1311,7 @@ mutable object, such as a list or a dictionary: if the function modifies the
13111311
object (e.g. by appending an item to a list), the default parameter value is in effect
13121312
modified. This is generally not what was intended. A way around this is to use
13131313
``None`` as the default, and explicitly test for it in the body of the function,
1314-
e.g.::
1314+
for example::
13151315

13161316
def whats_on_the_telly(penguin=None):
13171317
if penguin is None:

0 commit comments

Comments
 (0)