Skip to content

Commit

Permalink
Typing docs: fix typo in annotating tuples comment (python#106048)
Browse files Browse the repository at this point in the history
  • Loading branch information
EamonTracey authored Jun 23, 2023
1 parent d8ca5a1 commit 8ef0ee4
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 8ef0ee4

Please sign in to comment.