<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.32.2">
</HEAD>
<BODY>
On Wed, 2011-08-03 at 11:44 -0400, Jim Jewett wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Wed, Aug 3, 2011 at 4:11 AM, Greg Ewing <<A HREF="mailto:greg.ewing@canterbury.ac.nz">greg.ewing@canterbury.ac.nz</A>> wrote:
> With a slight relaxation of the rules concerning statements
> on a single line, one could write
>
> for bar in foo: with context: if baz:
> # stuff
>
> Not that I'd really advocate that, but it might help to
> shut up the people who keep requesting this sort of thing.
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
</PRE>
</BLOCKQUOTE>
<BR>
I think this is in the category of ... If it isn't broke, don't fix it. <BR>
<BR>
-1<BR>
<BR>
<BR>
This tries to do two distinct things.<BR>
1. Put multiple statements on a single line.<BR>
2. Have them apply to a common block of code.<BR>
<BR>
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.<BR>
<BR>
Cheers,<BR>
Ron<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
Cheers,<BR>
Ron<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
</BODY>
</HTML>