New submission from Toni Diaz: 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 ---------- components: Demos and Tools messages: 222606 nosy: Toni Diaz priority: normal severity: normal status: open title: To duplicate a list has biyective properties, not inyective ones type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21943> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com