Skip to content

Commit c89844a

Browse files
miss-islingtonm-aciekAA-Turner
authored
[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 8898a86) Co-authored-by: Maciej Olko <[email protected]> Co-authored-by: Adam Turner <[email protected]>
1 parent 297104c commit c89844a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ Doc/reference/datamodel.rst
163163
Doc/reference/expressions.rst
164164
Doc/reference/import.rst
165165
Doc/reference/simple_stmts.rst
166-
Doc/tutorial/controlflow.rst
167166
Doc/tutorial/datastructures.rst
168167
Doc/tutorial/introduction.rst
169168
Doc/using/cmdline.rst

Doc/tutorial/controlflow.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ This example, as usual, demonstrates some new Python features:
534534
Different types define different methods. Methods of different types may have
535535
the same name without causing ambiguity. (It is possible to define your own
536536
object types and methods, using *classes*, see :ref:`tut-classes`)
537-
The method :meth:`~list.append` shown in the example is defined for list objects; it
537+
The method :meth:`!append` shown in the example is defined for list objects; it
538538
adds a new element at the end of the list. In this example it is equivalent to
539539
``result = result + [a]``, but more efficient.
540540

@@ -1046,7 +1046,7 @@ Function Annotations
10461046
information about the types used by user-defined functions (see :pep:`3107` and
10471047
:pep:`484` for more information).
10481048

1049-
:term:`Annotations <function annotation>` are stored in the :attr:`__annotations__`
1049+
:term:`Annotations <function annotation>` are stored in the :attr:`!__annotations__`
10501050
attribute of the function as a dictionary and have no effect on any other part of the
10511051
function. Parameter annotations are defined by a colon after the parameter name, followed
10521052
by an expression evaluating to the value of the annotation. Return annotations are

0 commit comments

Comments
 (0)