Iteration index

D-Man dsh8290 at
Fri Jun 1 22:56:26 CEST 2001

On Fri, Jun 01, 2001 at 04:46:31PM -0400, Tim Peters wrote:
| [D-Man]
| > What is the difference between a "vector" and an "array" in this
| > context?  (Not as in   void[] or void*  vs.  std::vector< void* > )
| Beats me -- what do those words mean to *you*?  Then you can explain the
| difference yourself <wink>.  I usually use them as synonyms.

I was also thinking of Object[] (array of objects)  and
java.lang.Vector.  Now that I know you consider them as synonyms you
won't confuse me any more by causing me to wonder what a vector in C

| > I took a look at listobject.c and liistobject.h and I see that the
| > list itself is just a PyObject** -- a pointer to a C array on the
| > heap.  I also noticed in the 'ins1' function that inserting an
| > element (not at the end) causes all others elements to be moved.
| > Isn't this pretty inefficient or is it such an infrequent
| > operation that it matters less than the O(1) PyList_GetItem?
| Dozens and dozens of Kbs of discussions about this were posted to
| over the last 7 days.  

Oh, I missed that discussion.  I kill-thread anything whose subject
doesn't immediately strike me as interesting.


More information about the Python-list mailing list