Message159807
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
[['1', '2']]
>>> c
['1', '2']
>>> a
['2']
>>>
Is this wrong? I think the "b" should not change. |
|
Date |
User |
Action |
Args |
2012-05-02 16:15:16 | Daniel543 | set | recipients:
+ Daniel543 |
2012-05-02 16:15:16 | Daniel543 | set | messageid: <1335975316.5.0.356302155228.issue14707@psf.upfronthosting.co.za> |
2012-05-02 16:15:15 | Daniel543 | link | issue14707 messages |
2012-05-02 16:15:15 | Daniel543 | create | |
|