[3.12] gh-101100: Fix Sphinx warnings in tutorial/controlflow.rst (GH-109424) (#110084)

gh-101100: Fix Sphinx warnings in `tutorial/controlflow.rst` (GH-109424)
(cherry picked from commit 8898a8683b)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2023-09-29 06:29:39 -07:00 committed by GitHub
parent 297104cce5
commit c89844aaec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -163,7 +163,6 @@ Doc/reference/datamodel.rst
Doc/reference/expressions.rst Doc/reference/expressions.rst
Doc/reference/import.rst Doc/reference/import.rst
Doc/reference/simple_stmts.rst Doc/reference/simple_stmts.rst
Doc/tutorial/controlflow.rst
Doc/tutorial/datastructures.rst Doc/tutorial/datastructures.rst
Doc/tutorial/introduction.rst Doc/tutorial/introduction.rst
Doc/using/cmdline.rst Doc/using/cmdline.rst

View file

@ -534,7 +534,7 @@ This example, as usual, demonstrates some new Python features:
Different types define different methods. Methods of different types may have Different types define different methods. Methods of different types may have
the same name without causing ambiguity. (It is possible to define your own the same name without causing ambiguity. (It is possible to define your own
object types and methods, using *classes*, see :ref:`tut-classes`) object types and methods, using *classes*, see :ref:`tut-classes`)
The method :meth:`~list.append` shown in the example is defined for list objects; it The method :meth:`!append` shown in the example is defined for list objects; it
adds a new element at the end of the list. In this example it is equivalent to adds a new element at the end of the list. In this example it is equivalent to
``result = result + [a]``, but more efficient. ``result = result + [a]``, but more efficient.
@ -1046,7 +1046,7 @@ Function Annotations
information about the types used by user-defined functions (see :pep:`3107` and information about the types used by user-defined functions (see :pep:`3107` and
:pep:`484` for more information). :pep:`484` for more information).
:term:`Annotations <function annotation>` are stored in the :attr:`__annotations__` :term:`Annotations <function annotation>` are stored in the :attr:`!__annotations__`
attribute of the function as a dictionary and have no effect on any other part of the attribute of the function as a dictionary and have no effect on any other part of the
function. Parameter annotations are defined by a colon after the parameter name, followed function. Parameter annotations are defined by a colon after the parameter name, followed
by an expression evaluating to the value of the annotation. Return annotations are by an expression evaluating to the value of the annotation. Return annotations are