I'd call it an n-ary comparison.
Operators that work on arbitrary numbers of operands are called "n-ary" operators:
n-ary
From a mathematical point of view, a function of n arguments can always be considered as a function of one single argument which is an element of some product space. However, it may be convenient for notation to consider n-ary functions, ...
The same is true for programming languages, where functions taking several arguments could always be defined as functions taking a single argument of some composite type such as a tuple, or in languages with higher-order functions, by currying.
- Binary means 2-ary.
- ...
- n-ary means n operands (or parameters), but is often used as a synonym of "polyadic".
Python has an n-ary <
operator. Section 5.6 of the language docs says:
Unlike C, all comparison operations in Python have the same priority, which is lower than that of any arithmetic, shifting or bitwise operation. Also unlike C, expressions like a < b < c
have the interpretation that is conventional in mathematics:
Formally, if a
, b
, c
, ..., y
, z
are expressions and op1, op2, ..., opN are comparison operators, then a
op1 b
op2 c
... y
opN z
is equivalent to a
op1 b
and
b
op2 c
and
... y
opN z
, except that each expression is evaluated at most once.