PEP 308: A PEP Writer's Experience - CON

Andrew Koenig ark at
Sun Feb 9 00:14:59 CET 2003

Neil>    The "if" appears unnecessary to me.

Neil> condition then val1 else val2

Neil>    appears unambiguous and doesn't reuse "if". So

Neil> text += isPythonic() then "+1" else twice("minus-ungood")

This suggestion makes me nervous, even if we disregard the
extra keyword, because of the following example:

        if x then y else z:
             print "Foo"

What this would really mean is

        if x:
             p = y
             p = z
        if p:
             print "foo"

but that's sure how it appears at first glance

Andrew Koenig, ark at,

More information about the Python-list mailing list