TABS in the CPython C source code

John Bokma john at
Sat Feb 6 22:44:56 CET 2010

"Alf P. Steinbach" <alfps at> writes:

> Just trying to delve into the CPython source code.
> Pleasant surprise: while e.g. the gcc compiler is written in K&R C
> (1975 style C), CPython seems to be written in almost modern C (1989
> and on).
> But, hey, TABS used for indenting, combined haphazardly and randomly
> with SPACES used for indenting, in the same source files...
> The size-8 tabs look really bad in an editor configured with tab size
> 4, as is common in Windows.

Then you are either used a broken editor or a misconfigured editor. I've
used TextPad for ages, and it can be configured to hard tab 8 (might
even be the default [1]).

[1] With Perl coding I configured it to indent 4 spaces, hard tab 4
    spaces and convert hard tabs to 4 spaces while saving, so no surprises.
John Bokma                                                               j3b

Hacking & Hiking in Mexico - - Perl & Python Development

More information about the Python-list mailing list