[Python-Dev] Add a "transformdict" to collections

Ethan Furman ethan at stoneleaf.us
Thu Sep 12 17:05:44 CEST 2013

On 09/12/2013 07:43 AM, Antoine Pitrou wrote:
> Yeah, so this is totally silly. What you're basically saying is "we
> don't need TransformDict since people can re-implement it themselves".

No, what I'm saying is that the "case-preserving" aspect of transformdict is silly.  The main point of transformdict is 
to enable, for example, 'IBM', 'Ibm', and 'ibm' to all match up as the same key.  But why?  Because you don't trust the 
user data.  And if you don't trust the user data you have to add the correct version of the key yourself before you ever 
process that data, which means you already have the correct version stored somewhere.


More information about the Python-Dev mailing list