[New-bugs-announce] [issue32150] Expand tabs to spaces in C files

Serhiy Storchaka report at bugs.python.org
Mon Nov 27 11:40:18 EST 2017


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

While most C files use spaces for indenting and aligning, there are few sites in which tabs are left. Sometimes mixed tabs and spaces are used in the same file.

This adds a noise in the diff if the committer uses an editor which doesn't preserve tabs (see for example PR 4390). This can hide semantic changes in tab expansion changes.

I reviewed many patches with accidentally expanded tabs to spaces. Usually I request removing unrelated changes from the patch. But this still happened, and tabs slowly are disappeared from the sources. There are less tabs in the current default branch than in any maintained branch.

I think it is better to make the expansion in a single not so large commit that allow them be mixed with semantical changes. PR 4583 does this. The changes first were made automatically, and after that I have edited them manually for removing excessive indentations in some files (4 spaces are enough). Tabs have been kept only in generated file Modules/unicodedata_db.h and in imported files Modules/_ctypes/* and Modules/expat/siphash.h.

----------
components: Interpreter Core
messages: 307068
nosy: gvanrossum, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Expand tabs to spaces in C files
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32150>
_______________________________________


More information about the New-bugs-announce mailing list