On Mon, 2006-10-02 at 16:04 -0700, kirby urner wrote:
Or we might import the copy module.
Or we might "take the whole thing as a slice" i.e. newlist = oldlist[:].
I used the list(handle1) alternative purposefully, based on Alex Martelli's position on the matter. The first time I heard him state a position on it was in an exchange on python-list in which I participated precisely on the subject under discussion re:referencing and copying It was one of the more satisfying discussions I have had on python-list. Apparently what I was saying was in line with some other discussion he has having with Anna re: CookBook2, and it seemed to have some influence in how he intended to approach the issue on "copy" in that edition. Don't know the end result, as I have CookBook1 and haven't sprung for 2. Here is a reference to that thread http://mail.python.org/pipermail/python-list/2004-August/237278.html Guido knows that this is a favorite topic of mine and has considered me quite the nudge for returning to it as often as I do. Art