Given this type:
class TPerson(TypedDict):
name: str
address: str
I want another TypedDict inheriting the previous one, like:
class TDealer(TPerson):
db-id: int
police_record: str
arrested_now: bool
class TConsumer(TPerson):
db-id: int
preferred_product: str
stoned_now: bool
But, since db-id is not a valid identifier, I need to use functional syntax both for TDealer and TConsumer.
Is it possible to inherit from another TypedDict using functional syntax?
I see TypedDict definition is like:
class _TypedDict(Mapping[str, object], metaclass=ABCMeta):
But not sure 100% if this is a No!
If not, which could be a nice workaround?