ternary operator

Alex Martelli aleax at aleax.it
Thu Feb 6 18:50:35 EST 2003


Paul Rubin wrote:
   ...
> Yeah.  I've never understood this obsession with keeping conditional
> expressions out of Python.  They didn't confuse people in Algol-60 and
> I think Pascal (designed as newbie language from the beginning) had
> them too.

I believe you misremember.  Pascal, as designed (as a language for
newbies) by N. Wirth, had no conditional expressions (and no logical
operators that ensured short-circuiting, either).  Pascal was a very
deliberate reversion to simplicity from the complications of Algol-68
(I _think_ Algol 60 didn't have "short-circuiting conditional expressions"
either, and it did make a distinction between statements and expressions,
like Pascal and unlike Algol 68 -- but it's been far too long since I
actually used Algol for me to feel certain about it), so that is hardly
surprising.

I don't think there are implications about Python from the choices
historically made by Backus, Naur, Wirth, and others in the '60s, but
nevertheless I'd appreciate clarification by careful historians...


Alex





More information about the Python-list mailing list