non-copy slices

Themis Bourdenas t.bourdenas07 at
Thu Nov 19 18:55:26 CET 2009

On Thu, Nov 19, 2009 at 2:44 PM, Ethan Furman <ethan at> 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~
> --

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list