[Python-Dev] non-binary operators
Gerald S. Williams
gsw@agere.com
Fri, 14 Feb 2003 12:54:45 -0500
I'm *not* discussing PEP 308, since that's supposed to
be happening on c.l.py. The operator names have been
changed to protect the innocent. :-)
Gary Herron wrote:
> The above defines two binary operators "[POINTED]" and
> "[STICK]" and a ternary operator "[POINTED]...[STICK]".
[...]
> can the action of the ternary operator be defined in
> terms of the actions of the two binary operators?
[...]
> The answer is *NO*, all three expressions evaluate to
> different results.
Why is that any different from the following set, which
are already three different expressions in Python?
( bunch_of_grapes < banana ) < pointed_stick
bunch_of_grapes < ( banana < pointed_stick )
bunch_of_grapes < banana < pointed_stick
-Jerry