[Python-ideas] adding dictionaries

Paul Moore p.f.moore at gmail.com
Tue Jul 29 08:22:34 CEST 2014


On 29 July 2014 00:04, Alexander Heger <python at 2sn.net> wrote:
> D = A | B | C
>
> becomes
>
> D = dict(collections.ChainMap(C, B, A))

This immediately explains the key problem with this proposal. It never
even *occurred* to me that anyone would expect C to take priority over
A in the operator form. But the ChainMap form makes it immediately
clear to me that this is the intent.

An operator form will be nothing but a maintenance nightmare and a
source of bugs. Thanks for making this obvious :-)

-1.

Paul


More information about the Python-ideas mailing list