A modest indentation proposal

Erann Gat gat at jpl.nasa.gov
Tue Dec 4 14:52:27 EST 2001


In article <slrna0q0o3.m0c.clgonsal at keeshah.penguinpowered.com>,
clgonsal at kami.com wrote:

> I think this is the problem Erann is getting at: Python doesn't have any
> (redundant) notation after a block closing that indicates that a block
> was closed. It does however have redundant information before a block
> opening (the colon). Because of this (the lack of redundant info at the
> end of a scope), editors cannot always determine how to auto-indent
> pasted chunks of code, because there are multiple "right answers" for
> certain lines.

That's exactly right.

> I don't actually like Erann's semicolon suggestion though.

The semicolon was a straw-man.  I don't much care what the convention is
as long as it exists and is standardized.  I would much prefer not to use
the # end ... convention because IMO it's too verbose, though making the
end-block marker look like a comment may be the right answer.  Maybe "#;"
or "#." or "#:" or (God forbid!) "#}".

E.



More information about the Python-list mailing list