merits of Lisp vs Python

André Thieme address.good.until.2006.dec.22 at justmail.de
Fri Dec 8 11:36:14 EST 2006


hankhero schrieb:

> Some clever details, like using minus to index vectors from the right.
> (aref "hello" -1) gives an error on Lisp, but the character o on Python.

It would not be difficult to add this feature to Lisp.


> Another detail I like is that you can choose how to quote strings, in
> Python you can write three double-quotes to start a string that can
> include anything, quotes, doublequotes and newlines.
> You can use double-quote if you want to embed single-quotes "john's" or
> single-quote if you want to embed double-quotes '<id="2">'.

You could add a reader macro in Lisp that allows you to do the same.
At the moment I would say that one could pretty much add most Python
features to Lisp. Be it slicing, list comprehension, or, if one wants,
Pythons object system.

On the other hand can I see difficulties in adding macros to Python,
or inventing a new object system, or adding new keywords without
changing the sources of Python itself.


André
-- 



More information about the Python-list mailing list