Skip to content
Merged
Changes from 1 commit
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
Next Next commit
bpo-44490: Add 'Whats New' docs regarding types.Union chanages
  • Loading branch information
uriyyo committed Jul 17, 2021
commit 23ac64f10838711140e6c0e44763df085e674f3b
15 changes: 15 additions & 0 deletions Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,21 @@ sqlite3
:meth:`~sqlite3.Connection.set_authorizer`.
(Contributed by Erlend E. Aasland in :issue:`44491`.)

typing
------

* Add :attr:`__parameters__` and :meth:`__getitem__` to :class:`types.Union`.
Fix various :class:`types.Union` compatibility issues with :mod:`typing`
module.

.. code-block:: python
>>> from typing import TypeVar
>>> T = TypeVar("T")
>>> (int | T)[float]
int | float

(Contributed by Yurii Karabas in :issue:`44490`.)


Removed
=======
Expand Down