[Python-Dev] deque alternative (was: Linked lists)
Tim Peters
tim.peters at gmail.com
Mon Dec 26 04:46:45 CET 2005
[Martin Blais]
> ...
> Also, there is something incredibly elegant and simple and compact
> about the cons cell, maybe all we need is a good simple cons cell type
> and a nice interface on it, so you get both single-linked lists and
> trees at the same time...
The first "cons cell" C extension for Python I know about was written in 1994:
http://www.python.org/search/hypermail/python-1994q2/0110.html
There have been others, but the audience for them appears so small
that none catch on.
Like Phillip Eby, I use 2-tuples for this when I feel the need
(usually during a backtracking graph search, to keep track of paths
back to the root in a space-efficient way), and am happy with that.
More information about the Python-Dev
mailing list