Mark Tarver <dr.mtar...@ukonline.co.uk> writes:
> But are Python lists also indistinguishable from conventional
> Lisplists for list processing.  For example, can I modify a Python
> list non-destructively?  Are they equivalent to Lisp lists. Can CAR
> and CDR in Lisp be thought of as

Python lists are vectors that automatically resize.  You can append to
the end in amortized constant time in the obvious way (i.e. the
implementation allocates some extra space for expansion, and copies to
an even bigger area if you run out of expansion room).  You can insert
and delete in the middle in linear time.  This isn't as bad as it
sounds because the Python interpreter is pretty slow, but the list
insertion/deletion primitives are in C and are fast.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to