Conditional operator in Python?

Marcin 'Qrczak' Kowalczyk qrczak at
Tue Sep 4 18:50:48 CEST 2001

Tue, 04 Sep 2001 09:21:15 -0700, Erik Max Francis <max at> pisze:

> Maybe something like
> 	if X return Y else Z

    if (X) Y else Z
which looks like statement if without colons (but parens are required).

> I wouldn't be averse to introducing a new keyword for this purpose,
> but if that's the stumbling block, it seems that a preexisting
> keyword can be used in this context that will work just as well.

At least I don't see other problems (and other than "it's unnecessary
feature bloat").

 __("<  Marcin Kowalczyk * qrczak at
  ^^                      SYGNATURA ZASTĘPCZA

More information about the Python-list mailing list