I'd like to do something like: from typing import TypeVar, Generic, TypedDict T = TypeVar("T") class Foo(Generic[T], TypedDict): bar: T ... foo: Foo[int] = {"bar": 42} But this yields a type error ("cannot inherit from both a TypedDict and a non-TypedDict base class"). Are there any ways to achieve this result? Continue reading...