Georg Brandl ge...@python.org added the comment:
if-else actually was already documented, under boolean expressions. It was
merely missing from the precendence table.
I've now given it its own section, to make it stand out a bit better. See
r78772.
--
resolution: - fixed
status:
Meador Inge mead...@gmail.com added the comment:
It seems to me from the grammar
(http://docs.python.org/reference/expressions.html#grammar-token-conditional_expression)
that the precedence for conditional expressions fall in between that of
'lambda' and 'or' expressions.
--
Eric Smith e...@trueblade.com added the comment:
For what it's worth, these are properly called Conditional Expressions. See
PEP 308 for the gory details, including figuring out what the precedence is. It
was news to me that the allowed syntax is slightly different in 2.x and 3.x.
--
New submission from Dirkjan Ochtman dirk...@ochtman.nl:
So http://docs.python.org/reference/expressions.html doesn't currently mention
the ternary operator as far as I can see. Maybe this is trivial, but it would
be nice to know where it fits into the hierarchy.
(I.e., my co-worker just came
Changes by Dirkjan Ochtman dirk...@ochtman.nl:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8039
___
___
Python-bugs-list