Re: extension to list extend

2007-10-16 Thread James Stroud
Peter Otten wrote: > James Stroud wrote: > >> Found that this would be handy today: >> >>alist = [1, 2, 3] >>alist.extend(['a', 'b', 'c'], 1) >>alist == [1, 'a', 'b', 'c', 2, 3] # True > > A better name for that would be insert(), but that is already used for > single-item insertion.

Re: extension to list extend

2007-10-16 Thread Peter Otten
James Stroud wrote: > Found that this would be handy today: > >alist = [1, 2, 3] >alist.extend(['a', 'b', 'c'], 1) >alist == [1, 'a', 'b', 'c', 2, 3] # True A better name for that would be insert(), but that is already used for single-item insertion. For the time being you can do >

extension to list extend

2007-10-16 Thread James Stroud
Found that this would be handy today: alist = [1, 2, 3] alist.extend(['a', 'b', 'c'], 1) alist == [1, 'a', 'b', 'c', 2, 3] # True James -- James Stroud UCLA-DOE Institute of Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com -- http://mail.python.org