statements in control structures (Re: Conditional Expressions don't solve the problem)

Markus Schaber use-net at schabi.de
Tue Oct 23 17:09:01 EDT 2001


Hi,

On Fri, 19 Oct 2001 18:45:14 +0000 (UTC), huaiyu at gauss.almadan.ibm.com
(Huaiyu Zhu) wrote:

> - presumably multiple "while" parts would be allowed.

I don't see the sense behind this, could you give me an example where this would be useful and what semantics you have in mind?

> - If the "do" part is optional, it would be difficult to locate the
> start of  a loop.

That's a good point against this.

> - If the "do" part is mandatary, the keyword "while" must be changed -
> to  what?

I don't think there's a technical reason to change the keyword. But not changing it would lead to making the do part optional... hmm...

> One small problem is whether the while part should be indented or not:
> It is more like a "case" statement (with fall through) than an "elif"
> statement.

You mean that while is more indented than do, and the statements are further indented? I'm afraid this would be too complex for programmers and parsers to handle.

if/elif/else use same indentation level, also try/except/finally use the same indentation level.

markus
-- 
You don't have to be Microsoft to suck... but it helps.
(Tim Hammerquist in comp.lang.python)



More information about the Python-list mailing list