mirror of
https://github.com/python/cpython.git
synced 2026-01-26 21:03:34 +00:00
gh-143728: Keep TypedDict and NamedTuple in class role in docs (#143702)
This commit is contained in:
parent
80e9eaf071
commit
865eb12e07
@ -2369,7 +2369,7 @@ These functions and classes should not be used directly as annotations.
|
||||
Their intended purpose is to be building blocks for creating and declaring
|
||||
types.
|
||||
|
||||
.. function:: NamedTuple
|
||||
.. class:: NamedTuple
|
||||
|
||||
Typed version of :func:`collections.namedtuple`.
|
||||
|
||||
@ -2589,7 +2589,7 @@ types.
|
||||
for more details.
|
||||
|
||||
|
||||
.. function:: TypedDict
|
||||
.. class:: TypedDict(dict)
|
||||
|
||||
Special construct to add type hints to a dictionary.
|
||||
At runtime ":class:`!TypedDict` instances" are simply :class:`dicts <dict>`.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user