On Sat, Feb 20, 2010 at 5:41 PM, Steven D'Aprano <st...@remove-this-cybersource.com.au> wrote: > > What the OP wants is: > > (1) assign the name l2 to l1[:10] without copying > (2) resize l1 in place to the first 10 items without affecting l2. >
For ten items, though, is it really faster to muck around with array lengths than just copying the data over? Array copies are extremely fast on modern processors. Programmer time and processor time being what it is, I still think my answer is the correct one. No, it's not what he says he wants, but it is what he needs. -- Jonathan Gardner jgard...@jonathangardner.net -- http://mail.python.org/mailman/listinfo/python-list