[issue14707] extend() puzzled me.

2013-03-11 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- Removed message: http://bugs.python.org/msg184008 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue14707] extend() puzzled me.

2013-03-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset c162e2ff15bd by Terry Jan Reedy in branch '2.7': Issue #14707: add news entry http://hg.python.org/cpython/rev/c162e2ff15bd -- nosy: +python-dev ___ Python tracker ___

[issue14707] extend() puzzled me.

2012-05-03 Thread Daniel543
Daniel543 added the comment: Thank u both. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14707] extend() puzzled me.

2012-05-02 Thread Ezio Melotti
Ezio Melotti added the comment: >>> a = ['1'] >>> b = [] >>> c = a # now c and a refer to the same object >>> b.append(a) # this object is appended to b >>> a ['1'] >>> b [['1']] >>> c ['1'] # a and c refer to the same object you have in b # so all these ['1'] are actually the same object >>> a

[issue14707] extend() puzzled me.

2012-05-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: This is correct behavior, because: >>> b[0] is c True (read up on the meaning of the "is" operator, if this is not a convincing proof to you). -- nosy: +loewis resolution: -> invalid status: open -> closed ___ P

[issue14707] extend() puzzled me.

2012-05-02 Thread Daniel543
New submission from Daniel543 : Python 2.7.3 (default, Apr 20 2012, 22:44:07) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> a = ['1'] >>> b = [] >>> c = a >>> b.append(a) >>> a ['1'] >>> b [['1']] >>> c ['1'] >>> a = ['2'] >>> c.extend(a) >>> b