merits of Lisp vs Python

Paul Rubin http
Mon Dec 11 20:10:00 EST 2006


André Thieme <address.good.until.2006.dec.22 at justmail.de> writes:
> In Python it can't happen because + is not a function.
> And what do you do if you want to pass + as a HOF?

Use a lambda.  There's a library module (use "import operator") that
exports functions for most of these operators.  It's used sometimes
but not all that often.  You could think of Python as sort of a
Huffman code.  It tries to make the most common operations very
convenient, sometimes at the expense of the less common ones.



More information about the Python-list mailing list