Message222606
Python 2.7.3 (default, Mar 13 2014, 11:03:55)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a=['dog']
>>> b=a
>>> a
['dog']
>>> b
['dog']
>>> b.remove('dog')
>>> a
[]
>>> b
[]
>>>
When defining a list from another (b=a), in my opinion, I expect that all you do to one doesn't affect to the other one.
However, with the commands .remove & .append I don't see that (the definition b=a is bijective).
Should it work this way?
Thanks |
|
Date |
User |
Action |
Args |
2014-07-09 09:11:52 | Toni Diaz | set | recipients:
+ Toni Diaz |
2014-07-09 09:11:52 | Toni Diaz | set | messageid: <1404897112.14.0.409769296554.issue21943@psf.upfronthosting.co.za> |
2014-07-09 09:11:52 | Toni Diaz | link | issue21943 messages |
2014-07-09 09:11:51 | Toni Diaz | create | |
|