Hacker News new | ask | show | jobs
by anewaccountname 6330 days ago
Give me one example where you would ever want a copy of a tuple rather than another reference to it.
1 comments

That wasn't my point. My point was that [:] conserves the type of sequence.

Also [:] returns a reference to the existing tuple instead of a copy:

    >>> a = (1, 2, 3)

    >>> id(a)
    3081276268L

    >>> id(a[:])
    3081276268L