Proposed PEP for a Conditional Expression
Ralph Corderoy
ralph at inputplus.demon.co.uk
Fri Sep 14 11:18:20 EDT 2001
Hi,
> > The colon is too overloaded in C, but the semicolon isn't? At
> > least one semicolon appears in every C statement.
>
> False! The semicolon is used to make a statement out of an
> expression.
Not always.
do {
foo();
} while (x);
The last semi-colon isn't making a statement from an expression. it's
merely helping with error recovery in the parser.
Ralph.
More information about the Python-list
mailing list