mirror of
https://github.com/python/cpython.git
synced 2025-10-02 21:25:24 +00:00
Fix is_typeddict markup (#22501)
This commit is contained in:
parent
9cd01ece78
commit
bd71a43340
1 changed files with 6 additions and 5 deletions
|
@ -1666,12 +1666,13 @@ Introspection helpers
|
||||||
Check if a type is a :class:`TypedDict`.
|
Check if a type is a :class:`TypedDict`.
|
||||||
|
|
||||||
For example::
|
For example::
|
||||||
class Film(TypedDict):
|
|
||||||
title: str
|
|
||||||
year: int
|
|
||||||
|
|
||||||
is_typeddict(Film) # => True
|
class Film(TypedDict):
|
||||||
is_typeddict(Union[list, str]) # => False
|
title: str
|
||||||
|
year: int
|
||||||
|
|
||||||
|
is_typeddict(Film) # => True
|
||||||
|
is_typeddict(Union[list, str]) # => False
|
||||||
|
|
||||||
.. versionadded:: 3.10
|
.. versionadded:: 3.10
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue