[Python-checkins] [3.12] Typing docs: fix typo in annotating tuples comment (GH-106048) (#106049)
AlexWaygood
webhook-mailer at python.org
Fri Jun 23 16:35:04 EDT 2023
https://github.com/python/cpython/commit/de1c090879b9fe81fc08271484036f3abb16f6e4
commit: de1c090879b9fe81fc08271484036f3abb16f6e4
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: AlexWaygood <Alex.Waygood at Gmail.com>
date: 2023-06-23T21:35:00+01:00
summary:
[3.12] Typing docs: fix typo in annotating tuples comment (GH-106048) (#106049)
Typing docs: fix typo in annotating tuples comment (GH-106048)
(cherry picked from commit 8ef0ee4ebc84ee68f16cea85ffdb949ecccb4ba5)
Co-authored-by: Eamon Tracey <66919574+EamonTracey at users.noreply.github.com>
files:
M Doc/library/typing.rst
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 99a26d7a5e0f..4c6f89b2048c 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -362,8 +362,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
More information about the Python-checkins
mailing list