Skip to content

Commit 8898a86

Browse files
m-aciekAA-Turner
andauthored
gh-101100: Fix Sphinx warnings in tutorial/controlflow.rst (#109424)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent f1b1680 commit 8898a86

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Doc/tools/.nitignore

-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ Doc/reference/datamodel.rst
146146
Doc/reference/expressions.rst
147147
Doc/reference/import.rst
148148
Doc/reference/simple_stmts.rst
149-
Doc/tutorial/controlflow.rst
150149
Doc/tutorial/datastructures.rst
151150
Doc/tutorial/introduction.rst
152151
Doc/using/cmdline.rst

Doc/tutorial/controlflow.rst

+2-2
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)