Re: [Python-ideas] Make types.MappingProxyType hashable
29 Jul
2016
29 Jul
'16
5:50 p.m.
Date: Thu, 28 Jul 2016 22:23:35 +0000 From: Emanuel Barry
To: "guido@python.org" Cc: "python-ideas@python.org" Subject: Re: [Python-ideas] Make types.MappingProxyType hashable
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. - Elazar
2826
Age (days ago)
2826
Last active (days ago)
0 comments
1 participants
participants (1)
-
אלעזר