
On Thu, Oct 17, 2019 at 06:07:51PM -0400, Christopher Barker wrote:
" Open questions Should these operators be part of the ABC Mapping API? '
Absolutely! having the built in mapping NOT be the same as the Mapping API seems like a really bad idea.
I'm not so sure about that, which is why it's an open question. The PEP proposes a much more limited change: the concrete class dict to support a merge operator + or maybe | rather than making any proposals for other mappings and the abstract Mapping API. The Mapping API provides: in equality subscripting (getitem) get keys/items/values len iter Notice that there is no `update` API. Dicts currently have at least eight APIs which aren't part of the Mapping API: update pop and popitem setdefault copy clear delitem and setitem The key point of abstract base classes is that they provide the *minimum* interface you can expect from a Mapping. This PEP does not require all mapping types to support a merge operator. -- Steven