merits of Lisp vs Python
Frank Buss
fb at frank-buss.de
Sun Dec 10 09:46:39 EST 2006
Steven D'Aprano wrote:
> Yes. But you can't redefine 1+2 in Python, at least not without hacking
> the interpreter. Can you redefine (+ 1 2) in Lisp?
Yes, that's no problem and works without warnings and in every Common Lisp
implementation:
CL-USER > (shadow '+)
T
CL-USER > (defun + (&rest rest) (apply #'- rest))
+
CL-USER > (+ 3 1)
2
--
Frank Buss, fb at frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
More information about the Python-list
mailing list