New submission from Hang Liao:

Suppose I have two lists 
L1 = [1,3,2,4], L2 = [1,3,2,4]
L1[1], L1[2] = L1[2], L1[1]
This gives me L1 = [1,2,3,4]
However, if I write
L2[1], L2[L2[1] - 1] = L2[L2[1] - 1], L2[1]
This gives me back the same L2 = [1,3,2,4]
I am not sure if this is a mistake ... If it is what it intended to do please 
tell me.

----------
components: macOS
messages: 296614
nosy: Ikaros, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Swap doesn't work in some circumstances
type: behavior
versions: Python 3.5

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

Reply via email to