(tp)
return isinstance(tp, _TypedDictMeta)
Check if an annotation is a TypedDict class

    For example::
        class Film(TypedDict):
            title: str
            year: int

        is_typeddict(Film)  # => True
        is_typeddict(Union[list, str])  # => False
Check if an annotation is a TypedDict class
Check if an annotation is a TypedDict class
def is_typeddict(tp):
    """Check if an annotation is a TypedDict class

    For example::
        class Film(TypedDict):
            title: str
            year: int

        is_typeddict(Film)  # => True
        is_typeddict(Union[list, str])  # => False
    """
    return isinstance(tp, _TypedDictMeta)
def is_typeddict ( tp ) : return isinstance ( tp , _TypedDictMeta )