TypedDict t is not compatible with dict, see https://peps.python.org/pep-0589/#type-consistency. However, they are very practical, for instance, to type hint the context of serializers that expect more arguments.
Using a Mapping for the type would give more flexibility.
TypedDict
t is not compatible withdict
, see https://peps.python.org/pep-0589/#type-consistency. However, they are very practical, for instance, to type hint the context of serializers that expect more arguments.Using a
Mapping
for the type would give more flexibility.