statements in control structures (Re: Conditional Expressions don't solve the problem)
John Roth
johnroth at ameritech.net
Fri Oct 19 13:21:47 EDT 2001
More information about the Python-list mailing list
Fri Oct 19 13:21:47 EDT 2001
- Previous message (by thread): PEP: statements in control structures
- Next message (by thread): statements in control structures (Re: Conditional Expressions don't solve the problem)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Huaiyu Zhu" <huaiyu at gauss.almadan.ibm.com> wrote in message news:slrn9sruhl.ll.huaiyu at gauss.almadan.ibm.com... > I've been writing this for several evenings. It's not polished, but IMHO it > solves most of the problems discussed in this thread. So here it goes. :-) > <snip to save space> I've been away for a couple of days, so I'm going to comment on several of the issues raised in the discussion in one place. 1. I totally agree with the posters that the proposed syntax will cause unnecessary confusion. If it was required that such a suite had to be surrounded by some delimiters (either brackets or braces, not parens) it would make it much more visually distinctive, as well as handle the continuation problem which either hasn't been mentioned, or which I missed. 2. Given the existence of iterators in 2.2, I don't know how much this would add to the while statement. Since it doesn't have quite the right semantics for the 'increment' function of a loop, I suspect not that much. 3. However, I am absolutely in favor of something like this for the 'elif' statement. I can let it go for 'if' - it's identical to just putting the statements in front of the if statement, after all. I find it a rather frequent occurrence (and this may be a comment on my programming style) to have to stop a series of 'elif's to make a computation that is now possible, and which supports later 'elif's. Currently, that requires stopping the entire 'if' sequence, with the attendant issues of making the sequence end properly. It gets rather ugly. John Roth
- Previous message (by thread): PEP: statements in control structures
- Next message (by thread): statements in control structures (Re: Conditional Expressions don't solve the problem)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list