12 Feb
2015
12 Feb
'15
9:29 p.m.
Chris Barker - NOAA Federal wrote:
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.
But it's mean to be an in-place version of whatever the + operator does on that type. It doesn't make sense for a type that doesn't have a + operator. (And no, you can't argue that dict should be given a + operator just so you can give it a += operator!) -- Greg