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