Benjamin Peterson <benja...@python.org> added the comment:

Python doesn't have multiple assignment, just tuple unpacking. Consider the 
order of evaluation here:

1. tmp = (6, x[2]) (i.e., (6, 2))
2. x[2] = tmp[0]
3. tmp2 = x.index(6) (= 2)
4. x[tmp2] = tmp[1] (i.e., x[2] = 2)

----------
nosy: +benjamin.peterson
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40109>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to