On 29.07.2014 08:22, Paul Moore wrote:
On 29 July 2014 00:04, Alexander Heger <python@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.
FWIW, one could use an operator which inherently shows a direction: << and >>, for both directions respectively. A = B >> C lets B take precedence, and A = B << C lets C take precedence. regards, jwi p.s.: I’m not entirely sure what to think about my suggestion---I’d like to hear opinions.
An operator form will be nothing but a maintenance nightmare and a source of bugs. Thanks for making this obvious :-)
-1.
Paul _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/