python-frozendict
python-frozendict copied to clipboard
Generics?
In code using PEP 484, it would be nice to be able to do this:
def spam() -> FrozenDict[Text, int]):
return frozendict({'eggs': 1})
The CamelCase name is chosen to mirror typing.FrozenSet et al. I think you can sort of use typing.Mapping[A, B] instead if you need generics, but it's not as specific.