For review: PEP 308 - If-then-else expression

Roy Smith roy at panix.com
Sun Feb 9 20:17:26 CET 2003


Piet van Oostrum <piet at cs.uu.nl> wrote:

> This would cause a subtle problem, which by the way is now also present if
> someone confuses the parentheses:
> 
> If b is a variable that takes only 0 and 1 as values then
> 
> b -> (x, y) is the same as
> b -> [y, x]
> 
> because with boolean conditionals people are used to have the true clause
> first. And we shouldn't change that.

That is an excellent point.




More information about the Python-list mailing list