[Python-Dev] PEP 455: TransformDict
Nick Coghlan
ncoghlan at gmail.com
Wed Oct 9 23:34:11 CEST 2013
On 9 Oct 2013 01:07, "Antoine Pitrou" <solipsis at pitrou.net> wrote:
>
> Le Tue, 8 Oct 2013 22:49:28 +1000,
> Nick Coghlan <ncoghlan at gmail.com> a écrit :
> > > Well, you could ask the same question about OrderedDict,
> > > defaultdict or Weak*Dictionary since neither of them use
> > > composition :-)
> >
> > We *did* ask the same question about those (except the Weak* variants,
> > simply due to age).
> >
> > Each time, the point that each new dict variant would be used to
> > justify yet *more* variants was a cause for concern.
>
> Could you explain? I don't understand.
Just that the comment I replied to is getting very close to the argument
"we have so many non-composable mapping variants already, what's the harm
in adding one more?". I believe potentially enabling that argument in the
future was cited as a downside for all of defaultdict, OrderedDict and
Counter.
> > "Composition doesn't work with some mappings" isn't an adequate
> > answer to the criticism that a composition based design could work
> > with more mappings than just the builtin dict.
>
> Fair enough.
>
> Regards
>
> Antoine.
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20131010/fb750108/attachment.html>
More information about the Python-Dev
mailing list