python list handling and Lisp list handling

Mark Tarver dr.mtarver at ukonline.co.uk
Fri Apr 24 13:55:10 EDT 2009


On 24 Apr, 17:19, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> Mark Tarver <dr.mtar... at ukonline.co.uk> writes:
> > But are Python lists also indistinguishable from conventional
> > Lisplists for list processing.  
>
> Forgot to add: you might look athttp://norvig.com/python-lisp.html
>
> Mark Tarver <dr.mtar... at ukonline.co.uk> writes:
> > But are Python lists also indistinguishable from conventional
> > Lisplists for list processing.
>
> They are very different.  There is nothing like cons or nconc.
> You can't convert two lists to a single longer list with nconc,
> etc.

Ah;  so this

def cons (x,y):
  return [x] + y

is not accurate?

Mark



More information about the Python-list mailing list