Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • FW: List copying idiom was implementation ofcopystandard lib

    0 answers - 439 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    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 thought of that. Doh.
    tom

Re: FW: List copying idiom was implementation ofcopystandard lib


max 4000 letters.
Your nickname that display:
In order to stop the spam: 5 + 4 =
QUESTION ON "Development"

EMSDN.COM