New submission from Serhiy Storchaka <storchaka+cpyt...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue32150>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to