missing 'xor' Boolean operator

Jonathan Gardner jgardner at jonathangardner.net
Wed Jul 15 11:02:04 CEST 2009


On Jul 14, 4:48 pm, Ethan Furman <et... at stoneleaf.us> wrote:
>
> A whole family of supers.  :)
>

You should pick up Lisp. The whole concept of a binary operator
doesn't exist over there. All the things binary operators can do, Lisp
does with 0, 1, 2, or more arguments.

[1]> (+)
0
[2]> (+ 1)
1
[3]> (+ 1 2)
3
[4]> (+ 1 2 3)
6

Once you get used to that, binary operators don't seem so useful
anymore.

The equivalent in Python is dropping the operators and replacing them
with built-in functions that take 0, 1, 2, or more arguments.



More information about the Python-list mailing list