On Mon, Sep 28, 2015 at 3:40 PM, Terry Reedy <tjreedy@udel.edu> wrote:
On 9/28/2015 3:38 PM, Emile van Sebille wrote:
On 9/28/2015 10:24 AM, Andrew Barnert via Python-ideas wrote:
On Sep 28, 2015, at 09:47, Sven R. Kunze
<srkunze@mail.de> wrote:
<snip>

I wouldn't make a mountain out of a molehill. Other existing
operators have the same issue.

Which other keywords or symbols may be either a binary operator or
part of a ternary operator depending on context?

These come to mind:

a = b = c
a < b < c

These are chained comparisons, which get separated, not ternary operators. a < b = c < e > f in g is also syntactically valid, and I don't think anything is gained by calling it a pentanary operator.

But a < b < c is an excellent example of something that cannot be mindlessly refactored into (a < b) < c.

--
--Guido van Rossum (python.org/~guido)