On approximately 1/26/2010 7:50 PM, came the following characters from
the keyboard of Cameron Simpson:
My point was that I look on python builtins like list and dict as highly
optimised, highly efficient facilities. That means that I expect a "list"
to be very very much like a linear array as one would find in C-like
languages, with realloc() managment behind the scenes to handle the
resizing requirements on append/extend.
As a newcomer to python, I must say that I wouldn't expect a list to be
like an array. I'd expect it more to be like a list... many
implementations of lists (linked lists, in particular) make it O(1) to
add to the front or back. An array can be used to represent a list, but
there are known inefficiencies that result when doing so, one of which
the Subject patch is working to address. I guess I would have expected
something called an array to be more like an array, rather than
something called a list. But one has to read the documentation to find
out what things really mean, in a new environment.
--
Glenn -- http://nevcal.com/
===========================
A protocol is complete when there is nothing left to remove.
-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking
_______________________________________________
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