For review: PEP 308 - If-then-else expression
Aahz
aahz at pythoncraft.com
Mon Feb 10 00:56:20 EST 2003
In article <yu997kc8ooli.fsf at europa.research.att.com>,
Andrew Koenig <ark at research.att.com> wrote:
>
>but must confess that I'm growing more in favor of
>
> if cond: true_expr else: false_expr
>
>even though it looks like an if statement -- or perhaps *because*
>it looks like an if statement.
>
>I don't think there's any real ambiguity from the compiler's
>viewpoint, because "if" denotes a statement only when it is the first
>token of the statement and an expressin otherwise.
You obviously haven't used the interactive interpreter much.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
Register for PyCon now! http://www.python.org/pycon/reg.html
More information about the Python-list
mailing list