[Python-Dev] (back to): Linked lists -- (was: deque alternative)

2005-12-27 Thread Martin Blais
On 12/26/05, Josiah Carlson [EMAIL PROTECTED] wrote: A flat list or tuple would certainly be more space-efficient up to this point. But when the graph branches, the 2-tuple representation allows *sharing* the common path suffix (which may be very long!): ... If there's an N-way branch,

Re: [Python-Dev] (back to): Linked lists -- (was: deque alternative)

2005-12-27 Thread Aahz
On Tue, Dec 27, 2005, Martin Blais wrote: Now, it's not all about storage space. What about front-insertion? Everytime I have to type L.insert(0, bli), somewhere that I know runs often I cringe. If I had lists I would be able to express my thoughts more clearly in the computer program.

Re: [Python-Dev] (back to): Linked lists -- (was: deque alternative)

2005-12-27 Thread Raymond Hettinger
[Martin Blais] Now, it's not all about storage space. What about front-insertion? Everytime I have to type L.insert(0, bli), somewhere that I know runs often I cringe. If I had lists I would be able to express my thoughts more clearly in the computer program. Right now, I cringe, and then