All leading tabs or all leading spaces - why isn't that enforced?

Delaney, Timothy (Tim) tdelaney at
Tue Aug 7 05:50:46 CEST 2007

John Nagle wrote:

>    One can argue over tab vs. space indentation, but mixing the two
> is just wrong.  Why not have CPython report an error if a file has
> both leading tabs and leading spaces?  I know that was proposed at
> some point, but I don't think it ever went in. That would catch a
> common error introduced during maintenance.

To warn about mixed tabs and spaces:
python -t <script>

To issue errors for mixed tabs and spaces:
python -tt <script>

Tim Delaney

More information about the Python-list mailing list