ternary operator

John Roth johnroth at ameritech.net
Tue Feb 11 13:37:26 CET 2003

"Delaney, Timothy C (Timothy)" <tdelaney at avaya.com> wrote in message
news:mailman.1044936775.9789.python-list at python.org...
> From: Mel Wilson [mailto:mwilson at the-wire.com]
> 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 ().

I must say, I don't remember that from my two weeks of COBOL programming
on work experience for school back in 1989(?).

> Python does COMPLETELY the WRONG THING  with this.

<wink> That's just sick.

Tim Delaney

Sigh. It's also wrong - whoever wrote the original didn't know COBOL!
While I've forgotten the syntax, it has a fully functional case style
construct (SELECT)?.

John Roth

More information about the Python-list mailing list