On Jan 25, 2010, at 11:22 AM, Steve Howell wrote:
> I am interested in creating a patch to make deleting elements from the front
> of Python list work in O(1) time by advancing the ob_item pointer.
+1 on doing whatever experiments you feel like doing
-1 on putting something like this in the core
1) To many things in the Python world rely on the current implementation of
lists. It's not worth breaking third-party extensions, tools like psyco, work
on unladen swallow, and other implementations of Python such as PyPy and Jython.
2). The use of lists pervades the language and it doesn't make sense to have
the language as a whole pay a price (in terms of speed and space) for every
list that gets created. The corner case isn't worth it.
3). We already got one. The collections.deque() class was introduced
specifically to handle inserting and popping from the front of a list
efficiently.
4). In the comp.lang.python thread on this subject, you've gotten nearly zero
support for your position and have managed to offend many of the developers.
Raymond
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com