[Info] PEP 308 accepted - new conditional expressions

Sebastian Bassi sbassi at gmail.com
Tue Oct 11 04:25:57 CEST 2005

On 9/30/05, Reinhold Birkenfeld <reinhold-birkenfeld-nospam at wolke7.net> wrote:
> after Guido's pronouncement yesterday, in one of the next versions of Python
> there will be a conditional expression with the following syntax:
> X if C else Y

I don't understand why there is a new expression, if this could be
accomplished with:

if C:

What is the advantage with the new expression?

<a href="http://www.spreadfirefox.com/?q=affiliates&id=24672&t=1">La
web sin popups ni spyware: Usa Firefox en lugar de Internet

More information about the Python-list mailing list