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

Carlos Ribeiro cribeiro at mail.inet.com.br
Sat Feb 8 13:23:42 EST 2003


On Saturday 08 February 2003 06:22 am, Laura Creighton wrote:
> Thus answering the question 'if we let it in will we get code that
> is hard to read'.  I want my control flow with indentation, please.

Humm. I think you are overestimating the problem. Conditional expressions tend 
to be used for simple stuff - selecting between two values, for example. More 
complex decisions will certainly be done using traditional 'if' statements. 
This will allow for the flow of control structure to become clearer, not more 
confusing, because a lot of if's that don't really add very much 
understanding to the program logic can be removed out of the way. The style 
guide may be helpful here, telling people to aboid abuses of the conditional 
operator.


Carlos Ribeiro
cribeiro at mail.inet.com.br





More information about the Python-list mailing list