No need of new syntax
Posted Mar 13, 2003 10:42 UTC (Thu) by
sokol (guest, #4383)
Parent article:
Choosing a ternary operator for Python
I am not a Python user but it seems that even in its actual form, Python allows a very similar (and elegant IMHO) syntax:
<cond> and <expr1> or <expr2>
(you may put it in paranthesis if you like)
which works *exactly* in the same manner its C sibling:
<cond> ? <expr1> : <expr2>
So why all this hype ?
(
Log in to post comments)