[Python-3000] Stackable Blocks

Jim Jewett jimjjewett at gmail.com
Mon Apr 24 18:44:44 CEST 2006


On 4/23/06, Jay Parlar <jparlar at cogeco.ca> wrote:

> ... 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.

That would already be a slight improvement, from my perspective. 
Today, being done is required, but not sufficient.

The improvement is only slight, because the use case is quick
examples, and the extra regularity would be nice, but isn't required.

    >>> class C:
            def m(self): pass

but

    >>> class C: def m(self): pass
    SyntaxError: invalid syntax


-jJ


More information about the Python-3000 mailing list