python list/array question...

Diez B. Roggisch deets at nospam.web.de
Wed Jul 5 10:44:40 EDT 2006


Sybren Stuvel wrote:

> Bruno Desthuilliers enlightened us with:
>> Python has lists (which AFAIK really are arrays not linked lists,
>> but they are called 'lists').
> 
> An array is generally understood as a list of items of the same type,
> hence Python lists aren't arrays.

Only in the same sense as lists are. Inhomogeneous lists are of course
possible in python, and maybe even common, but many people argue that is
bad style. And in FP languages they are especially frown upon.

And AFAIK the internal representation is an array of object-pointers.

Regards,

Diez



More information about the Python-list mailing list