summaryrefslogtreecommitdiffstats
path: root/Doc/library/typing.rst
diff options
context:
space:
mode:
authorkj <28750310+Fidget-Spinner@users.noreply.github.com>2020-11-19 17:37:26 (GMT)
committerGitHub <noreply@github.com>2020-11-19 17:37:26 (GMT)
commite1dc0db8c7cb8c4d7343e051ba85146b375bb8e0 (patch)
tree09a88141998e4d57fe2dcb5ae12adca34c1f2efd /Doc/library/typing.rst
parent1b54077ff6f5c1379e097e9f8e8648da9826d6ec (diff)
downloadcpython-e1dc0db8c7cb8c4d7343e051ba85146b375bb8e0.zip
cpython-e1dc0db8c7cb8c4d7343e051ba85146b375bb8e0.tar.gz
cpython-e1dc0db8c7cb8c4d7343e051ba85146b375bb8e0.tar.bz2
bpo-42345: Add whatsnew and versionchanged for typing.Literal in 3.9 (GH-23386)
* Whatsnew entry in 3.9 same as the one in 3.10. * versionchanged for typing.Literal docs Needs backport to 3.9.
Diffstat (limited to 'Doc/library/typing.rst')
-rw-r--r--Doc/library/typing.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 5b66e3c..67fd55e 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -674,6 +674,12 @@ These can be used as types in annotations using ``[]``, each having a unique syn
.. versionadded:: 3.8
+ .. versionchanged:: 3.9.1
+ ``Literal`` now de-duplicates parameters. Equality comparison of
+ ``Literal`` objects are no longer order dependent. ``Literal`` objects
+ will now raise a :exc:`TypeError` exception during equality comparisons
+ if one of their parameters are not :term:`immutable`.
+
.. data:: ClassVar
Special type construct to mark class variables.