[New-bugs-announce] [issue24701] list.pop() removes items from multiple lists

annoywife report at bugs.python.org
Fri Jul 24 04:41:18 CEST 2015


New submission from annoywife:

When executing the following code, I would expect the 3 to be removed from "list_copy" while "list_original" remains unaltered.  However, list_copy.pop() removes the 3 from both lists.  If an index is specified for pop, this behavior occurs as well.

list_original = [1,2,3]
list_copy = list_original
list_copy.pop()

Please let me know if I can provide any other information.

----------
components: IDLE, Windows
messages: 247239
nosy: annoywife, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: list.pop() removes items from multiple lists
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24701>
_______________________________________


More information about the New-bugs-announce mailing list