Comment
Comment by BoppreH
The same problem frequently bites me in Python too:
I find it one of Python's biggest warts because it's silent, hard to troubleshoot (especially the first time!), and like in Go the most straightforward fix looks like a mistake (i=i):
I guess this is a lesson in designing language semantics that match people's intuitions, and learning from previous languages' mistakes.