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

Paul Rubin phr-n2003b at
Sat Feb 8 10:13:43 CET 2003

"Andrew Dalke" <adalke at> writes:
> Though with some cases, as in
>   is_html = True
>   ext = ["txt", "html"][is_html]
> the result is easy to understand.

For me at least, it's absurd to say that the above is clearer than a
conditional expression.

More information about the Python-list mailing list