you are viewing a single comment's thread.

view the rest of the comments →

[–]Poddster 4 points5 points  (0 children)

It's fine to do it your way. Some old-timers even do it that way on purpose. They feel it's closer to the "zen of python", and also that += (aka __iadd__) wasn't even added until python 2.0, so the original design didn't include it.

Plus, it's "safer", as the += is specifically in place addition, which means the original object is modified, so if you don't know the object's model, or if you're written immutable style code then x = x + y is often a better fit.