Proposed PEP for a Conditional Expression

Michael Abbott michael at rcp.co.uk
Thu Sep 13 18:12:04 CEST 2001


Erik Max Francis <max at alcyone.com> wrote in 
news:3BA0CE45.6084487 at alcyone.com:

> piet at cs.uu.nl wrote:
> 
>> > 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.
> 
> How does that contradict what I said?  What I said was completely
> accurate.  Each statement contains at least one semicolon.

Not quite (though the observation that semicolons convert statements to 
expressions isn't quite complete, either).  Consider:

    	if(expression) {}

However, I have to admit I can't think of a *useful* statement which 
doesn't contain any semicolons, and the only omission from the statement 
above is that the semicolon is also required to complete variable and 
struct/class declarations.

    	




More information about the Python-list mailing list