>> What real-world use case do you have for this?
> Not me, actually. Someone in #python asked about an immutable dict, > and I pointed them towards mappingproxy, only to realize it wasn't hashable. Maybe something like frozendict could be added, though? At this point I don't really have an opinion, so it's up to the list to decide if they want it or not :)
If the keys can be converted to/from valid identifiers, and the values are hashable, then namedtuple can give you your frozendict.