[Info] PEP 308 accepted - new conditional expressions

Peter Hansen peter at engcorp.com
Mon Oct 10 22:32:36 EDT 2005


Sebastian Bassi wrote:
> I don't understand why there is a new expression, if this could be
> accomplished with:
> 
> if C:
>  X
> else:
>  Y
> 
> What is the advantage with the new expression?

It actually is an expression, whereas your example shows a statement (so 
"this" could _not_ be accomplished with what you showed).

-Peter



More information about the Python-list mailing list