[Python-Dev] Fixing incorrect indentations in C files (Decoder functions accept str in py3k)

M.-A. Lemburg mal at egenix.com
Thu Jan 8 10:48:53 CET 2009

On 2009-01-08 01:01, Collin Winter wrote:
> On Wed, Jan 7, 2009 at 2:35 PM, Brett Cannon <brett at python.org> wrote:
>> On Wed, Jan 7, 2009 at 10:57, M.-A. Lemburg <mal at egenix.com> wrote:
>> [SNIP]
>>> BTW: The _codecsmodule.c file is a 4 spaces indent file as well (just
>>> like all Unicode support source files). Someone apparently has added
>>> tabs when adding support for Py_buffers.
>> It looks like this formatting mix-up is just going to get worse for
>> the next few years while the 2.x series is still being worked on.
>> Should we just bite the bullet and start adding modelines for Vim and
>> Emacs to .c/.h files that are written in the old 2.x style? For Vim I
>> can then update the vimrc in Misc/Vim to then have 4-space indent be
>> the default for C files.
> Or better yet, really bite the bullet and just reindent everything to
> spaces. Not every one uses vim or emacs, nor do all tools understand
> their modelines. FYI, there are options to svn blame and git to skip
> whitespace-only changes.

+1... and this should be done for both trunk and the 3.x branch
in a single checkin to resync them.

svn blame -x "-b" will do the trick for SVN. Perhaps there's even
some .subversion/config option to set this globally.

The question really is: How often do Python developers use svn blame ?

If this is only done for a file or two every now and then, I don't
think that adding the above option to the command would be much
to ask for.

The question to put up against this is: How often do you get
irritated by lines not being correctly indented ?

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Jan 08 2009)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the Python-Dev mailing list