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

Samuele Pedroni pedronis at bluewin.ch
Tue Feb 11 11:59:20 EST 2003


"Andrew Koenig" <ark at research.att.com> ha scritto nel messaggio
news:yu99vfzqpy2y.fsf at europa.research.att.com...
> Michele> Moreover,
>
> Michele> (if C: x
> Michele> else: y)
>
> Michele> it too similar to a statement.
>
> Too similar for what purpose?  If you were to rewrite it as a
> statement, it would have the same effect--so why is this similarity a
> problem?
>

'if' first thing on a line vs '(', is a parser/language lawyer fine line.

I don't recall the precise sentence but the timbot once stated that you are
always going to get questions, you can only somehow steer what kind of
questions you are going to get:

I don't like the naive questions that if: else: statement vs. if: else:
conditional expression could generate.






More information about the Python-list mailing list