[Python-ideas] Fast sum() for non-numbers

Serhiy Storchaka storchaka at gmail.com
Fri Jul 5 18:27:36 CEST 2013


05.07.13 19:22, Ron Adam написав(ла):
> The '&' is already used for Bitwise And.  How about '++' instead?
>
>
>      'hello ' ++ 'world' == "hello world"
>
>      [1, 3, 3] ++ [4, 5, 6] == [1, 2, 3, 4, 5, 6]
>
>
> While this doesn't seem like a big change, I think it would simplify
> code in many places that is more complicated than it really needs to be.

The '++' "operator" already defined for numbers.

 >>> 123 ++ 456
579




More information about the Python-ideas mailing list