[Python-ideas] PEP: Dict addition and subtraction

Chris Angelico rosuav at gmail.com
Fri Mar 22 03:51:49 EDT 2019


On Fri, Mar 22, 2019 at 6:47 PM Jonathan Fine <jfine2358 at gmail.com> wrote:
>
> Chris Angelico wrote:
>
> > The trouble with that is that you can't always use a dict subclass (or
> > a non-subclass MutableMapping implementation, etc, etc, etc). There
> > are MANY situations in which Python will give you an actual real dict,
> > and it defeats the purpose if you then have to construct an
> > AddableDict out of it just so you can add something to it. Not every
> > proposed change makes sense on PyPI, and it definitely won't get a
> > fair representation in "practical experience".
>
> Chris seems to accept that sometimes you can use a dict subclass, and
> that my proposal will give some representation of "practical
> experience".

I said "definitely won't", not "will give some". So, no.

ChrisA


More information about the Python-ideas mailing list