mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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.
This commit is contained in:
parent
1b54077ff6
commit
e1dc0db8c7
2 changed files with 35 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue