python list handling and Lisp list handling

Michele Simionato michele.simionato at gmail.com
Sat Apr 25 03:34:40 EDT 2009


On Apr 25, 9:07 am, Mark Tarver <dr.mtar... at ukonline.co.uk> wrote:
> OK; I guess the answer to the question
>
> "Assuming the following Python encodings, and ignoring questions
> of performance, would Python and Lisp lists then be observationally
> indistinguishable? i.e. would these then be fair encodings?"
>
> is a 'yes'.   Any disagreement?
>
> Mark

No disagreement here. Since I know that you are trying
to generate Python code automatically from Qi/Lisp code,
I would like to suggest you to target Python 3.0,
which has some feature you may like. For instance,
there is a weak form of pattern matching built-in:

>>> head, *tail = [1,2,3] # Python 3.0 only!
>>> head
1
>>> tail
[2, 3]
           Michele Simionato



More information about the Python-list mailing list