summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-09-29 13:29:39 (GMT)
committerGitHub <noreply@github.com>2023-09-29 13:29:39 (GMT)
commitc89844aaec272f0c6715cf600a7753fb817c30f0 (patch)
tree0d0f551ecef4a11e0ce76c3b2fd8a9095df692d1 /Doc/tutorial
parent297104cce56deb38813a9db8efc422ae768da639 (diff)
downloadcpython-c89844aaec272f0c6715cf600a7753fb817c30f0.zip
cpython-c89844aaec272f0c6715cf600a7753fb817c30f0.tar.gz
cpython-c89844aaec272f0c6715cf600a7753fb817c30f0.tar.bz2
[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 8898a8683b5631c24d51a6a7babf55a255874950) Co-authored-by: Maciej Olko <maciej.olko@affirm.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/controlflow.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index 4bcc376..aa9caa1 100644
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -534,7 +534,7 @@ This example, as usual, demonstrates some new Python features:
Different types define different methods. Methods of different types may have
the same name without causing ambiguity. (It is possible to define your own
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
``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
: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
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