In support of Stallman’s position, Python does not do the same thing as typical Lisp systems in the following areas:
-
The
readfunction in Lisp reads an S-expression, which represents an arbitrary data structure that can either be treated as data, or evaluated as code. The closest thing in Python reads a single string, which you would have to parse yourself if you want it to mean anything. -
The
evalfunction in Lisp can execute any Lisp code. Theevalfunction in Python evaluates only expressions, and needs theexecstatement to run statements. But both these work with Python source code represented as text, and you have to jump through a bunch of hoops to “eval” a Python AST. -
The
printfunction in Lisp writes out an S-expression in exactly the same form thatreadaccepts.printin Python prints out something defined by the data you’re trying to print, which is certainly not always reversible.
Stallman’s statement is a bit disingenuous, because clearly Python does have functions named exactly eval and print, but they do something different (and inferior) to what he expects.
In my opinion, Python does have some aspects similar to Lisp, and I can understand why people might have recommended that Stallman look into Python. However, as Paul Graham argues in What Made Lisp Different, any programming language that includes all the capabilities of Lisp, must also be Lisp.