python short conditional?
Roy Smith
roy at panix.com
Tue Sep 2 20:17:55 EDT 2003
Pieter Claassen <pieter at countersnipe.com> wrote:
> I am looking to find a short conditional for python equivalent
> to the perl question mark operator
>
> statement? if true:else false
There is no such ternary operator in Python. There was a HUGE debate
earlier this year about possibly adding it. To make a very long story
short, it's not going to happen. Look up PEP-308 for more details.
More information about the Python-list
mailing list