summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-11-19 17:59:10 (GMT)
committerGitHub <noreply@github.com>2020-11-19 17:59:10 (GMT)
commit1051ca4d974ebb6448f58b661aa28f8aff325ed3 (patch)
tree433fe83d7e555388a990635132dd4c8633875503 /Doc/library
parent2acd9d0c6ccf0b4360e3b63beddb97996bcb9bb1 (diff)
downloadcpython-1051ca4d974ebb6448f58b661aa28f8aff325ed3.zip
cpython-1051ca4d974ebb6448f58b661aa28f8aff325ed3.tar.gz
cpython-1051ca4d974ebb6448f58b661aa28f8aff325ed3.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. (cherry picked from commit e1dc0db8c7cb8c4d7343e051ba85146b375bb8e0) Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
Diffstat (limited to 'Doc/library')
-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 42a89ce..28c607e 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -655,6 +655,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.