Skip to content

Commit

Permalink
[3.12] Typing docs: fix typo in annotating tuples comment (pythonGH-1…
Browse files Browse the repository at this point in the history
…06048) (python#106049)

Typing docs: fix typo in annotating tuples comment (pythonGH-106048)
(cherry picked from commit 8ef0ee4)

Co-authored-by: Eamon Tracey <66919574+EamonTracey@users.noreply.github.com>
  • Loading branch information
miss-islington and EamonTracey authored Jun 23, 2023
1 parent 7d6ee29 commit de1c090
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit de1c090

Please sign in to comment.