Andre Delfino
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
5 deletions
-
Doc/library/typing.rst
|
|
|
@ -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 |
|
|
|
|
|
|
|
|