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

Delaney, Timothy (Tim) tdelaney at avaya.com
Wed Aug 17 02:14:16 CEST 2005


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



More information about the Python-list mailing list