<div class="gmail_quote">On Thu, Nov 19, 2009 at 2:44 PM, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us">ethan@stoneleaf.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Please don't top post. :)<br>
<div class="im"><br></div>So "shallow copy" == "new label created for existing object".<br>
<br>
So is your desired behavior to write back to the original list if your<br>
sub-list is modified? In other words, you are creating a window onto an<br>
existing list? If not, what would happen when a sublist element was<br>
modified (or deleted, or appended, or ...)?<br>
<div><div></div><div class="h5"><br>
~Ethan~<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br><div>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.</div>
<div><br></div><div>Themis</div><div><br></div>