On 4/23/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
>
> On Apr 23, 2006, at 5:12 PM, Crutcher Dunnavant wrote:
>
> > On 4/23/06, Ivan Krstic <[EMAIL PROTECTED]> wrote:
> >> Crutcher Dunnavant wrote:
> >>> for file in open_files: if file.readable():
> >>>   ...
> >>>
> >>> for line in open(file): if line.strip():
> >>
> >> I don't like this. It looks unclean and adds an exception to the
> >> conventional Python rules while yielding no particular or significant
> >> benefit.
> >
> > It doesn't add any exception, it changes how the block syntax works.
> >
>
> I think what Ivan meant is that the normal Python rule is that if you
> have a full-colon (ANYWHERE), and you put something after it on the
> same line, then you're done the block. This behaviour is the same for
> method definitions, IF-blocks, the FOR statement, class definitions,
> etc.
>
> However, your change would be an exception to the rule, in that it
> would change what a full-colon is allowed to do, but only in one place.

No, it wouldn't. First, this would apply to method and class defs as
well, so it's not an exception, secondly, the 'block ending thing
after the colon' would be _extended_ to cover other block defs.

--
Crutcher Dunnavant <[EMAIL PROTECTED]>
littlelanguages.com
monket.samedi-studios.com
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to