Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,8 @@ These can be used as types in annotations. They all support subscription using
tup: tuple[*Ts] # Syntax error on Python <= 3.10!
tup: tuple[Unpack[Ts]] # Semantically equivalent, and backwards-compatible

.. versionadded:: 3.11

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually put the version added at the end of the text unless there is a clear separation. Instead, I would suggest adding the following line:

.. versionadded:: 3.11

.. versionchanged:: 3.12
   Added support for :class:`typing.TypedDict`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, sounds good to me!


``Unpack`` can also be used along with :class:`typing.TypedDict` for typing
``**kwargs`` in a function signature::

Expand All @@ -1729,7 +1731,7 @@ These can be used as types in annotations. They all support subscription using

See :pep:`692` for more details on using ``Unpack`` for ``**kwargs`` typing.

.. versionadded:: 3.11
.. versionadded:: 3.12

Building generic types and type aliases
"""""""""""""""""""""""""""""""""""""""
Expand Down
Loading