Re: Tabs, spaces, and indentation

Skip Montanaro (montnaro@ausable.crd.ge.com)
Wed, 13 Apr 94 07:41:37 EDT

Guido writes:

People who want to see 4-space indentation on Unix may have no choice
but to mix spaces and tabs -- most editors' auto-indent mode optimizes
8 spaces into a tab.

My recommendation is to always use tabs on the Mac -- then it will
look good on the Mac and at least parse correctly everywhere.

For the same reason I recommend always using tabs on Unix as well
(thus indenting by 8 positions there), but the majority of Python
users seem to be against me.

My suggestion is that if you move code from Unix to other platforms where
mixing tabs and spaces might cause problems you run your code through a
filter to convert tabs to the appropriate number of spaces. Emacs' untabify
command does the trick nicely. There may well be other more traditional Unix
filters available. (Gee, perhaps somebody has written something appropriate
in Python...:-)

Skip (montanaro@crd.ge.com)