[Zope-Checkins] CVS: Zope/ZServer - FCGIServer.py:1.19

Tim Peters tim@zope.com
Wed, 14 Aug 2002 16:11:30 -0400


[Guido]
> Maybe the nightly test runs should invoke "python -tt".  That causes a
> SyntaxError whenever tabs/spaces are mixed.

[Martijn Pieters]
> Excellent idea, I just cleared out tabs from the Zope Trunk by running the
> tests with python -tt. Zope 2.5 appears clean now.

Probably not:  -tt doesn't actually warn about tabs, it warns only when both
tabs and spaces appear at the starts of lines, and in a way such that the
relative (wrt the preceding line) indentation differs if you think "tabs are
4 spaces" than if you think "tabs are 8 spaces".

In the Python codebase, I routinely run tools/scripts/redindent.py.  This
gets rid of all hard tabs (believing "tabs are 8 spaces"), normalizes all
indentation levels to 4 spaces per indent, nukes trailing whitespace from
lines, and trims trailing empty lines from files.  It works much harder than
similar tools to preserve intended indentation of comments relative to
source code.  It hasn't screwed up -- yet <wink>.