[Python-Dev] PEP 455: TransformDict

Antoine Pitrou solipsis at pitrou.net
Tue Oct 8 21:58:32 CEST 2013


On Tue, 8 Oct 2013 23:36:05 +0400
Yuriy Taraday <yorik.sar at gmail.com> wrote:
> On Tue, Oct 8, 2013 at 10:17 PM, MRAB <python at mrabarnett.plus.com> wrote:
> 
> > If you don't need the original key, then you might as well just use a
> > transform function with a dict.
> 
> As I understood, storing original keys is not the purpose of TransformDict,
> allowing hashing on something other then provided key itself is. This part
> presents interest for the cases I mentioned.

The purpose is really dual. If we didn't want to retain the original
keys, a dedicated class would be much less justified.

Regards

Antoine.




More information about the Python-Dev mailing list