Re: List copying idiom was Re: [Python-Dev] implementation of copy standard lib

2005-08-17 Thread Tom Anderson
On Wed, 17 Aug 2005, Steve Holden wrote: > Tom Anderson wrote: > >> On Tue, 16 Aug 2005, Ron Adam wrote: >> >>> Simon Brunning wrote: >>> On 8/14/05, Martijn Brouwer <[EMAIL PROTECTED]> wrote: > I can imagine that *a lot* of libs/scripts use the copy library, I think th

Re: List copying idiom was Re: [Python-Dev] implementation of copy standard lib

2005-08-17 Thread Steve Holden
Tom Anderson wrote: > On Tue, 16 Aug 2005, Ron Adam wrote: > > >>Simon Brunning wrote: >> >> >>>On 8/14/05, Martijn Brouwer <[EMAIL PROTECTED]> wrote: >>> >>> I can imagine that *a lot* of libs/scripts use the copy library, >>> >>>I think that copy is very rarely used. I don't think I've ever

Re: List copying idiom was Re: [Python-Dev] implementation of copy standard lib

2005-08-16 Thread John Machin
Tom Anderson wrote: > > When you say [:], do you mean that you copy lists like this: > > l = someList() > m = [] > m[:] = l > > ? Why not m = L[:] instead of m = []; m[:] = L ??? > > That's what i've been doing. The other day, i realised that i could just > do: > > l = someList() > m = list

List copying idiom was Re: [Python-Dev] implementation of copy standard lib

2005-08-16 Thread Tom Anderson
On Tue, 16 Aug 2005, Ron Adam wrote: > Simon Brunning wrote: > >> On 8/14/05, Martijn Brouwer <[EMAIL PROTECTED]> wrote: >> >>> I can imagine that *a lot* of libs/scripts use the copy library, >> >> I think that copy is very rarely used. I don't think I've ever imported it. > > I use copy.deepco