A modest indentation proposal

Johann Hibschman johannh at uclink.berkeley.edu
Thu Nov 29 18:05:24 EST 2001


gat at jpl.nasa.gov (Erann Gat) writes:

> 2) Parser support.  It would be enough to simply give a warning if there
> is a discrepancy between the block structure defined by indentation and
> that defined by the semicolon-at-end-of-line convention (i.e. "Warning:
> end of block detected without trailing semicolon").  Making this optional
> so that die-hard indentation fans could turn it off would also be fine.

This just seems to add extra complexity to me, without any useful
payoff.  I'd rather not have to worry about semicolons messing up the
nice, clear indentation-based blocking.  In short, I'd rather that you
not be able to screw up the indentation and still have it work.

If you use pure spaces, no tabs, then there is no problem with
indentation at all, so I recommend doing that.  Well, the only problem
is the occasional whitespace-eating nanovirus.

How often do you really cut and paste code?  And if you do, what's
wrong with simply indenting to fit its current locale?  If this is
harder than highlighting the pasted code and hitting some command key,
I'd recommend a different editor.

--Johann



More information about the Python-list mailing list