Are Python deques linked lists?
Duncan Booth
duncan.booth at invalid.invalid
Tue Dec 11 10:29:05 EST 2007
Neil Cerutti <horpner at yahoo.com> 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.
> 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.
More information about the Python-list
mailing list