ternary operator

Mel Wilson mwilson at the-wire.com
Mon Feb 10 11:04:40 EST 2003


In article <dGC0a.196393$AA2.7646718 at news2.tin.it>,
Alex Martelli <aleax at aleax.it> wrote:
>Trust me -- I know several excellent Cobol experts and ternary
>is NOT what they're looking for.  "PICTURE" and other uses of
>fixed-point are much more likely to be it, or maybe (though that
>still baffles me a bit) "ADD a TO b GIVING c" as an alternative
>to "weird, algebraic" (sic) "c = a + b" ...

As a COBOL programmer, I want

    if a < 3:
        less_than_3_thing ()
    elif 7:
        less_than_7_thing ()
    elif 92:
        some_other_thing ()
    else:
        not_appearing_in_the_above_code ().

Python does COMPLETELY the WRONG THING  with this.


        Regards.    Mel.


And now, back to the PEP 308 threads.




More information about the Python-list mailing list