Hacker News new | ask | show | jobs
by einpoklum 2209 days ago
I was actually not describing adding elements to a container, but adding up values.
1 comments

See? That's the problem with arithmetic on containers. Python has that already:

    v += 4, 5, 6
Comma doesn't do weird shit: that's just a tuple of numbers. But "+=" then does weird shit: it means concatenation when v is a standard library list, and element-wise addition when v is a numpy vector.