Re: [Python-ideas] multiple intro statements [was: combine for/with statement]

On Wed, Aug 3, 2011 at 4:11 AM, Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
hmm... I actually sort of like that ... statement: statement: statement: suite is equivalent to statement: statement: statement: suite On its own, it is a pure win to say "This statement really only does one thing; it is the subordinate statement that has a suite". That said, I'm wondering if the colon is used for enough other things that it would end up causing confusion in practice with slices or formatting or ... -jJ

On Wed, 2011-08-03 at 11:44 -0400, Jim Jewett wrote:
I think this is in the category of ... If it isn't broke, don't fix it. -1 This tries to do two distinct things. 1. Put multiple statements on a single line. 2. Have them apply to a common block of code. The main issues are with how those statements interact with the block. Some statements are only done once, while others are meant to be done on each iteration. So the order becomes something of importance, and it also becomes something of a problem to parse mentally. Cheers, Ron Cheers, Ron

ron3200 writes:
No. Each statement applies to the block following it, which starts on the same line. There's no common block involved, rather several strictly nested blocks.
So the order becomes something of importance,
Sure, just like short-circuited logical expressions. However, it is unambiguously expressed.
and it also becomes something of a problem to parse mentally.
Agreed (and Greg at least agrees, too).

On Wed, 2011-08-03 at 11:44 -0400, Jim Jewett wrote:
I think this is in the category of ... If it isn't broke, don't fix it. -1 This tries to do two distinct things. 1. Put multiple statements on a single line. 2. Have them apply to a common block of code. The main issues are with how those statements interact with the block. Some statements are only done once, while others are meant to be done on each iteration. So the order becomes something of importance, and it also becomes something of a problem to parse mentally. Cheers, Ron Cheers, Ron

ron3200 writes:
No. Each statement applies to the block following it, which starts on the same line. There's no common block involved, rather several strictly nested blocks.
So the order becomes something of importance,
Sure, just like short-circuited logical expressions. However, it is unambiguously expressed.
and it also becomes something of a problem to parse mentally.
Agreed (and Greg at least agrees, too).
participants (3)
-
Jim Jewett
-
ron3200
-
Stephen J. Turnbull