conditional expressions (RE: Loop-and-a-half (Re: Curious assignment behaviour))

John Roth johnroth at
Mon Oct 15 20:27:54 CEST 2001

"Ian Parker" <parker at> wrote in message
news:apXvDKAPApy7EwVg at
> In article <7xitdha8tg.fsf at>, Paul Rubin <phr-
> n2001d at> writes
> >"Tim Peters" < at> writes:
> >> > x = if e1 then (e2) else (e3)
> >> > and
> >> > x = (if e1 then (e2) else (e3))
> >> > should be equivalent and they preserve clarity.
> >>
> >> The latter form would be accepted, but not the former (and the former
> >> be accepted, which is a question of parser technology, not of taste).
> >
> >How did Algol 60 deal with this?
> to excess, and with a more complicated parser, I imagine:

Actually, there was a quite good book on one company's Algol 60
implementation (called "Algol 60 Implementation", I believe), that
showed a recursive descent parser, with all of the parser and interpreter
functions diagrammed out. This was before there was a whole lot
of parser theory to go by...

John Roth

More information about the Python-list mailing list