Is it really good?

Nadav Horesh NadavH at envision.co.il
Wed Jan 8 08:03:00 EST 2003


Thanks to those who clarified the issue for me. I see it as the follows:
The construct
A rel_op B rel_op C
is a type of ternary operator like the ?: in C. As one who deals mainly 
with numerical analysis, this was very attractive for me, as it much 
more clearer to read/write
 A < x < B
then
(A < x) and (x < B),
especially when x is an expression rather then a variable. But, as in 
the ?: case, the expression can be made clear, or being abused like in 
the "2 == 3 is good" example. So one can either take the practical 
attitude (if it mostly works it is fine), or the purist's (why should 
relation operators be treated differently).

P.S.
  There is at least on thread about ?: in python in python-deg mailing list.

  Nadav.






More information about the Python-list mailing list