mirror of
https://github.com/python/cpython.git
synced 2026-05-10 12:30:45 +00:00
[3.13] gh-143728: Keep TypedDict and NamedTuple in class role in docs (GH-143702) (#143800)
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
This commit is contained in:
parent
be602fcde6
commit
3dd9afcf91
1 changed files with 2 additions and 2 deletions
|
|
@ -2257,7 +2257,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`.
|
||||
|
||||
|
|
@ -2486,7 +2486,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…
Add table
Add a link
Reference in a new issue