On 29 November 2017 at 20:11, Barry Warsaw <barry@python.org> wrote:
Serhiy Storchaka wrote:
> In 3.7 I have removed an old-deprecated plistlib.Dict. [1] Actually it
> already was deprecated when the plistlib module was added to the regular
> stdlib in Python 2.6.
>
> Raymond noticed that that capability seemed nice to have.

So nice in fact that I'm sure I've reimplemented something similar
several times. :)

> What do you think about reviving this type as general purpose type in
> collections or types? Perhaps it can be convenient for working with
> JSON, plists, configuration files, databases and in other cases that
> need a dict with string keys.
>
> If reintroduce it, there are open questions.
>
> 1. The name of the type.
>
> 2. The location of the type. collections or types? Or other variants?
>
> 3. How it will collaborate with OrderedDict, defaultdict, etc?
>
> 4. Should it be a dict subclass, or a mixin, or a proxy? Or add several
> types?

I also wonder whether PEP 557 dataclasses could provide this except in
the opposite direction, e.g. by optionally adding __getitem__ support.

This was discussed in https://github.com/ericvsmith/dataclasses/issues/21
and it was decided to postpone this.

--
Ivan