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

Nikolaus Rath Nikolaus at rath.org
Sat Feb 14 05:13:19 CET 2015


On Feb 13 2015, Chris Barker - NOAA Federal <chris.barker-32lpuo7BZBA at public.gmane.org> wrote:
>>> As a regular numpy user, I'd be very happy about that too :-).
>
> I wouldn't -- I hated that in Matlab.

Well, I hate using Matlab, but I like the different operators :-).

> 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 don't think so. It'd e.g. free up + for array concatenation, / for
"vector" division (i.e., v / M == inverse(M) .* v, but without computing
the inverse), and ** for matrix exponentials. 

Yeah, backwards compatibility, I now. Just fantasizing about what could
have been....

Best,
Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«


More information about the Python-ideas mailing list