[Python-ideas] Why operators are useful

Rhodri James rhodri at kynesim.co.uk
Mon Mar 18 10:06:53 EDT 2019

On 16/03/2019 12:01, Gustavo Carneiro wrote:
> Already been said, but might have been forgotten, but the new proposed
> syntax:
>      new = a + b
> has to compete with the already existing syntax:
>      new = {**a, **b}

That's easy.  Whether it's spelt with "+" or "|" or pretty much anything 
else, the operator version is clearer and cleaner.  "{**a, **b}" is a 
combination of operators and literal (display) syntax, and following 
Guido's reasoning that makes it inherently harder to interpret.  It's 
also ugly IMHO, but that's me.

Rhodri James *-* Kynesim Ltd

More information about the Python-ideas mailing list