On Thu, Nov 19, 2009 at 2:44 PM, Ethan Furman <et...@stoneleaf.us> wrote:
> Please don't top post. :) > > So "shallow copy" == "new label created for existing object". > > So is your desired behavior to write back to the original list if your > sub-list is modified? In other words, you are creating a window onto an > existing list? If not, what would happen when a sublist element was > modified (or deleted, or appended, or ...)? > > ~Ethan~ > -- > http://mail.python.org/mailman/listinfo/python-list > Yes a window / view on the existing list describes it best. So every modification you make in this view is actually modifying the original list accordingly. Blist that was suggested in a previous email in the thread seems lightweight but it does create a new list when a modification is made. In any case, I've already implemented the object myself and I can post it if you care to have a look, but I was just wondering if there was already something in the standard library. Themis
-- http://mail.python.org/mailman/listinfo/python-list