[Python-Dev] Trinary Operators

Greg Ward gward@python.net
Thu, 6 Feb 2003 09:06:47 -0500


On 05 February 2003, Christopher Blunck said:
> One of the great things I love about py is how much bang for your buck you
> get per line of code.  I can do much more in 10 lines of py than I can do in
> Java.  Being able to do something like this would really help me:
>   bigger = a > b ? a : b

I won't claim to channel Guido, but C's ?: operator is ugly, obscure,
and weird.  Just because it has been copied by Java and Perl does not
mean it is a good thing.  The fact that Python does not ape C is a
*feature*.

        Greg
-- 
Greg Ward <gward@python.net>                         http://www.gerg.ca/
If you're not part of the solution, you're part of the precipitate.