Re: FW: List copying idiom was Re: [Python-Dev] implementation of copystandard lib

2005-08-17 Thread Tom Anderson
On Wed, 17 Aug 2005, Delaney, Timothy (Tim) wrote: > Tom Anderson wrote: > >> When you say [:], do you mean that you copy lists like this: >> >> l = someList() >> m = [] >> m[:] = l > > Forwarded to python-list, where it belongs. The idiom is actually: > > a = [1, 2, 3] > b = a[:] Aha. I'd never

FW: List copying idiom was Re: [Python-Dev] implementation of copystandard lib

2005-08-16 Thread Delaney, Timothy (Tim)
Tom Anderson wrote: > When you say [:], do you mean that you copy lists like this: > > l = someList() > m = [] > m[:] = l Forwarded to python-list, where it belongs. The idiom is actually: a = [1, 2, 3] b = a[:] Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list