I have a dictionary like so:
d = { 'my_label': ClassInstance() }
I would like to specify type hints to indicate that keys are strings, and values are instances of ClassInstance
.
Is this possible in Python 3.8?
I found TypedDict
but that seems to attempt to indicate a fixed set of keys. I would to allow any string as key.