merits of Lisp vs Python
greg
greg at cosc.canterbury.ac.nz
Sat Dec 16 02:22:07 EST 2006
André Thieme wrote:
> So instead of
> cmp(foo(a, b, c), bar(x, y, z)) you would prefer
> foo(a, b, c) cmp bar(x, y, z) ?
Incidentally, someone once came up with an fiendishly
clever hack that lets you write things in Python like
foo(a, b, c) |kmp| bar(x, y, z)
i.e. effectively define your own infix operators. And
it doesn't even require a macro. :-)
(Finding the trick to implementing this is left as an
exercise for the googler.)
--
Greg
More information about the Python-list
mailing list