Comment by patrec
3 years ago
It can mean two completely different things. `let x = x + 1` (rebinding) or `x += 1` (mutation).
In [5]: def cap(x):
...: xs = []
...: for i in range(3):
...: x+=1
...: xs.append(x)
...: return xs
...:
...:
In [6]: cap(numpy.array(0))
Out[6]: [array(3), array(3), array(3)]
In [7]: cap(0)
Out[7]: [1, 2, 3]
No comments yet
Contribute on Hacker News ↗