On 2007-12-11, Duncan Booth <[EMAIL PROTECTED]> wrote: > Neil Cerutti <[EMAIL PROTECTED]> wrote: >> If you put an instrumented iterator through, say, reversed or >> sorted, you'd lose the ability to use it to modify the list > > I think that is kind of irrelevant. reversed doesn't take an > iterator, it requires a sequence and returns an iterator. > sorted will take an iterator but it always returns a new list.
Thank you! Strangely enough I didn't know either of those things. I've been using sorted as if it were a generator, and I guess I've never used reversed on an iterator before. >> I do have one last question about a doubly-linked list. Would you >> have to perform any tricks (del statements) to get the garbage >> collector to collect every node, or will it just work? > > It should just work. Cool. -- Neil Cerutti I am free of all prejudices. I hate everyone equally. --W. C. Fields -- http://mail.python.org/mailman/listinfo/python-list