[Python-ideas] Adding "+" and "+=" operators to dict

Chris Barker - NOAA Federal chris.barker at noaa.gov
Sat Feb 14 01:46:21 CET 2015


>> As a regular numpy user, I'd be very happy about that too :-).

I wouldn't -- I hated that in Matlab.

It turns out the only ace it's really useful is the two kinds of
multiplication -- and we've now got the @ operator for that.

> .  I just fear it may be too late.

In some sense, it's too late _not_ to have them. It's been argued in
this thread that overloading  the math operators for things that
aren't clearly math was a mistake. In which case they could be used
for element-wise operations. But python wasn't designed to be an array
oriented language -- so this is where we are.

-Chris


More information about the Python-ideas mailing list