mirror of
https://github.com/python/cpython.git
synced 2024-12-04 23:34:42 +08:00
Fix is_typeddict markup (#22501)
This commit is contained in:
parent
9cd01ece78
commit
bd71a43340
@ -1666,12 +1666,13 @@ Introspection helpers
|
||||
Check if a type is a :class:`TypedDict`.
|
||||
|
||||
For example::
|
||||
class Film(TypedDict):
|
||||
title: str
|
||||
year: int
|
||||
|
||||
is_typeddict(Film) # => True
|
||||
is_typeddict(Union[list, str]) # => False
|
||||
class Film(TypedDict):
|
||||
title: str
|
||||
year: int
|
||||
|
||||
is_typeddict(Film) # => True
|
||||
is_typeddict(Union[list, str]) # => False
|
||||
|
||||
.. versionadded:: 3.10
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user