Tabs versus Spaces in Source Code

Pascal Bourguignon pjb at
Tue May 16 17:40:54 CEST 2006

"opalpa at opalinski from opalpaweb" <opalpa at> writes:

>> Simply put, tabs is proper, and spaces are improper.
>> Why? This may seem
>> ridiculously simple given the de facto ball of confusion: the semantics
>> of tabs is what indenting is about, while, using spaces to align code
>> is a hack.
> The reality of programming practice trumps original intent of tab
> characters.  The tab character and space character are pliable in that
> if their use changes their semantics change.
>> ... and the solution is to advance
>> the sciences such that your source code in some way
>> embed such information.
> If/when time comes where such info is embeded perhaps then tabs will be
> OK.
> ---------------------------------------------------------------
> I use spaces because of the many sources I've opened I have many times
> sighed on opening tabed ones and never done so opening spaced ones.
> I don't get mad, but sighing is a clear indicator  of negativity.
> Anyway, the more code I write and read the less indentation matters to
> me.  My brain can now parse akward source correctly far bettter than it
> did a few years ago.

And anyways, C-x h C-M-\ comes automatically after C-x C-f source RET 
Just add this to your ~/.emacs :

(add-hook 'find-file-hook
   (lambda () (indent-region (point-min) (point-max)) (pop-mark)))

__Pascal Bourguignon__           

IMPORTANT NOTICE TO PURCHASERS: The entire physical universe,
including this product, may one day collapse back into an
infinitesimally small space. Should another universe subsequently
re-emerge, the existence of this product in that universe cannot be

More information about the Python-list mailing list