Re: [Python-ideas] Adding "+" and "+=" operators to dict
12 Feb
2015
12 Feb
'15
11 a.m.
+1 on += Isn't that confusing ;-) Yes, we have dict.update(), but the entire reason += exists (all the augmented assignment operators -- they are called that, yes?) is because we didn't want methods for everything. It particular, I believe a major motivator was numpy, where in-place operations are a major performance boost. Sure, numpy could have added methods for all those, but the operator syntax is so much nicer, why not use it where we can? And I prefer + to | ... Seems much more obvious to me. Chris -Chris
3332
Age (days ago)
3332
Last active (days ago)
2 comments
2 participants
participants (2)
-
Chris Barker - NOAA Federal
-
Greg Ewing