[Python-Dev] PEP 455: TransformDict
Serhiy Storchaka
storchaka at gmail.com
Fri Sep 13 22:16:10 CEST 2013
13.09.13 21:40, Antoine Pitrou написав(ла):
> Alternative proposals and questions
> ===================================
Yet one alternative proposal is to add the dict.__transform__() method.
Actually this not contradict TransformDict, but generalize it.
TransformDict will be just handly interface to __transform__() as
defaultdict to __missing__(). It provides only constructor, repr and
pickling.
My second patch for http://bugs.python.org/issue18986 shows that as
implementation of dict.__transform__(), so implementation of
TransformDict using dict.__transform__() are simple enough.
More information about the Python-Dev
mailing list