[Python-Dev] TransformDict (PEP 455) Naming
techtonik at gmail.com
Mon Sep 16 08:28:28 CEST 2013
Does anybody know if http://vote.python.org is already operational?
I decided to start a separate thread for TransformDict name, because I
want to change it.
Current implementation of PEP 455 only touches dictionary keys and it
is more narrow than the name suggests. I'd reserve TransformDict name
for something that is used to transform some other data. For my data
transformation theory I have an idea of mapping with annotated fields
that is used to change the names of some source data structure to
target data structure, converting types and applying custom rules on
the way. This is a different, but more intuitive application of such
Name for the PEP 455 should be less abstract, more specialized. Which
transform? What is transformed? Where the transformation is taking
place? How it is going to be used? Why do you need a generalized
In PEP 455 I see two use cases only.
1. Case-insensitive keys.
dictik() - dictionary with insensitive keys
2. Identity dict.
dictik() - dictionary with implicit keys
The generic name for collections entry can be VagueKeysDict() or
DynamicKeysDict() or DynKeyDict(). The name should tell what's going
on with the type to people completely unfamiliar with concept.
OrderedDict() is a good name - dict with ordered entries, NamedTuple()
is so-so - tuple that has a name, but also ok. TransformDict() is just
too generic and doesn't tell anything - something is transformed, or
dict somehow transformed, or dict for transform. There should be a
More information about the Python-Dev