array and list

Travis Jensen travis.jensen at gmail.com
Fri Jan 18 13:53:23 EST 2008



On Jan 18, 2008, at 2:48 AM, bearophileHUGS at lycos.com wrote:

> J. Peng>why perl call it array and python call it list?<
>
> Unfortunate naming, I'd say. Calling list a dynamic array is silly,
> despite all the things you may say about abstract data types having
> the correct methods, etc.


I wouldn't call it unfortunate.  The list semantics follow LISP's  
semantics far more closely than C's array semantics.  I would hazard  
to guess that they are called lists because that is what every  
functional language calls them and this aspect of python was modeled  
after functional languages.

tj

Travis Jensen
travis.jensen at gmail.com

http://softwaremaven.innerbrane.com/

You should read my blog; it is more interesting than my signiature.




More information about the Python-list mailing list