]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-101100: Resolve reference warnings in reference/ (GH-138418) (#138681)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 15 Feb 2026 03:06:50 +0000 (04:06 +0100)
committerGitHub <noreply@github.com>
Sun, 15 Feb 2026 03:06:50 +0000 (03:06 +0000)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@ulbrych.org>
Doc/reference/compound_stmts.rst
Doc/reference/datamodel.rst
Doc/tools/.nitignore

index 80eb3e84d92573ebf083ef32ecc9bf490ba9d3fe..77228b2cc4ab18e38b146b0638773ba8c4915a2d 100644 (file)
@@ -154,7 +154,7 @@ The :keyword:`for` statement is used to iterate over the elements of a sequence
 (such as a string, tuple or list) or other iterable object:
 
 .. productionlist:: python-grammar
-   for_stmt: "for" `target_list` "in" `starred_list` ":" `suite`
+   for_stmt: "for" `target_list` "in" `!starred_list` ":" `suite`
            : ["else" ":" `suite`]
 
 The ``starred_list`` expression is evaluated once; it should yield an
@@ -608,9 +608,9 @@ The match statement is used for pattern matching.  Syntax:
 
 .. productionlist:: python-grammar
    match_stmt: 'match' `subject_expr` ":" NEWLINE INDENT `case_block`+ DEDENT
-   subject_expr: `star_named_expression` "," `star_named_expressions`?
-               : | `named_expression`
-   case_block: 'case' `patterns` [`guard`] ":" `block`
+   subject_expr: `!star_named_expression` "," `!star_named_expressions`?
+               : | `!named_expression`
+   case_block: 'case' `patterns` [`guard`] ":" `!block`
 
 .. note::
    This section uses single quotes to denote
@@ -699,7 +699,7 @@ Guards
 .. index:: ! guard
 
 .. productionlist:: python-grammar
-   guard: "if" `named_expression`
+   guard: "if" `!named_expression`
 
 A ``guard`` (which is part of the ``case``) must succeed for code inside
 the ``case`` block to execute.  It takes the form: :keyword:`if` followed by an
@@ -844,7 +844,7 @@ A literal pattern corresponds to most
    literal_pattern: `signed_number`
                   : | `signed_number` "+" NUMBER
                   : | `signed_number` "-" NUMBER
-                  : | `strings`
+                  : | `!strings`
                   : | "None"
                   : | "True"
                   : | "False"
@@ -1013,8 +1013,8 @@ subject value:
       items, as for a fixed-length sequence.
 
    .. note:: The length of the subject sequence is obtained via
-      :func:`len` (i.e. via the :meth:`__len__` protocol).  This length may be
-      cached by the interpreter in a similar manner as
+      :func:`len` (i.e. via the :meth:`~object.__len__` protocol).
+      This length may be cached by the interpreter in a similar manner as
       :ref:`value patterns <value-patterns>`.
 
 
index 3b21fb555155e2a773a8fc9be17f0df7baadd78f..ac3ce92bde3299af08334178bd45c74f10f8aed7 100644 (file)
@@ -1235,7 +1235,7 @@ Special attributes
    * - .. attribute:: type.__firstlineno__
      - The line number of the first line of the class definition,
        including decorators.
-       Setting the :attr:`__module__` attribute removes the
+       Setting the :attr:`~type.__module__` attribute removes the
        :attr:`!__firstlineno__` item from the type's dictionary.
 
        .. versionadded:: 3.13
@@ -1858,9 +1858,9 @@ falling back to :meth:`~object.__getitem__`). [#]_
 When implementing a class that emulates any built-in type, it is important that
 the emulation only be implemented to the degree that it makes sense for the
 object being modelled.  For example, some sequences may work well with retrieval
-of individual elements, but extracting a slice may not make sense.  (One example
-of this is the :class:`~xml.dom.NodeList` interface in the W3C's Document
-Object Model.)
+of individual elements, but extracting a slice may not make sense.
+(One example of this is the :ref:`NodeList <dom-nodelist-objects>` interface
+in the W3C's Document Object Model.)
 
 
 .. _customization:
@@ -2652,7 +2652,7 @@ class defining the method.
    .. versionadded:: 3.6
 
 
-When a class is created, :meth:`type.__new__` scans the class variables
+When a class is created, :meth:`!type.__new__` scans the class variables
 and makes callbacks to those with a :meth:`~object.__set_name__` hook.
 
 .. method:: object.__set_name__(self, owner, name)
index 0cae79402e6b591109ddd4785da1e147fb736632..39b88f88a61b7c565f93df107e7bb0c820a7125b 100644 (file)
@@ -47,8 +47,6 @@ Doc/library/xml.sax.reader.rst
 Doc/library/xml.sax.rst
 Doc/library/xmlrpc.client.rst
 Doc/library/xmlrpc.server.rst
-Doc/reference/compound_stmts.rst
-Doc/reference/datamodel.rst
 Doc/whatsnew/2.4.rst
 Doc/whatsnew/2.5.rst
 Doc/whatsnew/2.6.rst