[Python-bugs-list] [ python-Bugs-580073 ] list append inconsistency
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 11 Jul 2002 06:01:53 -0700
Bugs item #580073, was opened at 2002-07-11 13:01
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=580073&group_id=5470
Category: Python Interpreter Core
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Simon Duane (sduane)
Assigned to: Nobody/Anonymous (nobody)
Summary: list append inconsistency
Initial Comment:
I get inconsistent behaviour of the list append method
applied to a list of lists, depending on how the list of
lists is initialised. Something like
a = [[], []]
a[0].append(1)
is ok, but
a=[[]]*2
a[0].append(1)
works incorrectly, for me at least, producing
[[1], [1]]
instead of
[[1], []]
Simon Duane
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=580073&group_id=5470