A modest indentation proposal

Kragen Sitaker kragen at pobox.com
Sat Dec 1 06:41:04 EST 2001


gat at jpl.nasa.gov (Erann Gat) writes:
> Yes, of course it's a nit-pick issue.  These arguments are not entirely
> rational (though I actually do believe this argument has some merit, not
> that that matters).  These things have as much to do with fashion and
> ass-covering than with technical arguments.  What languages do "they" find
> acceptable?  C++.  Java is starting to make some inroads, but it's still a
> hard sell.

C++ for mission-critical applications?  What's next --- assembler?
TECO?  :) I guess that makes the point that the arguments are not
entirely rational pretty thoroughly.  Are the C++ programmers the ones
that cut and paste large blocks of code in mission-critical programs?

pindent.py is in the standard Python distribution.  It provides
exactly what you're asking for: an augmented, backward-compatible
representation for Python programs with unambiguous block closers (in
this case, comments that look like Ada), and a tool to fix broken
indentation using the block closers, to add the block closers to
existing programs, and to strip them out from existing programs.

Unfortunately, it doesn't seem to be widely used, and it has
documented bugs on unusual programs.

I think if you're looking for redundant expressions and compile-time
consistency checking, Python is not presently the best choice.




More information about the Python-list mailing list