]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] Typing docs: fix typo in annotating tuples comment (GH-106048) (#106050)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 23 Jun 2023 20:35:16 +0000 (13:35 -0700)
committerGitHub <noreply@github.com>
Fri, 23 Jun 2023 20:35:16 +0000 (21:35 +0100)
Typing docs: fix typo in annotating tuples comment (GH-106048)
(cherry picked from commit 8ef0ee4ebc84ee68f16cea85ffdb949ecccb4ba5)

Co-authored-by: Eamon Tracey <66919574+EamonTracey@users.noreply.github.com>
Doc/library/typing.rst

index ddb2f910dcd9fe41a0783f0781209bce506d0b4d..0c7a5ebd7a58c640503aeb81a85fd95f98991407 100644 (file)
@@ -340,8 +340,8 @@ the container will be of the same type. For example::
    # Type checker error: ``list`` only accepts a single type argument:
    y: list[int, str] = [1, 'foo']
 
-   # Type checker will infer that all keys in ``y`` are meant to be strings,
-   # and that all values in ``y`` are meant to be either strings or ints
+   # Type checker will infer that all keys in ``z`` are meant to be strings,
+   # and that all values in ``z`` are meant to be either strings or ints
    z: Mapping[str, str | int] = {}
 
 :class:`list` only accepts one type argument, so a type checker would emit an