[Python-3000] C style guide (was: C API changes?)

Tim Peters tim.peters at gmail.com
Thu Mar 23 04:56:16 CET 2006


[Brett Cannon]
|>> Yes, please!  I think for the Py3K codebase we should at least require
>> code meet the style guide.  We are all guilty of having ignored it at
>> some point,

I'm not :-)

> ...

[Nick Coghlan]
> I would love it if PEP 3007 standardised on 4-space indents, the same as the
> standard for Python code in the standard lib.

+1 here.

> I'd love it even more if reindent.py cleaned up C whitespace as well as
> Python whitespace.

I doubt that will happen.  reindent.py relies entirely on tokenize.py
for parsing, and that's 100% specific to Python.  Last time I was a
Unix-head, though, there were 3797 different programs for reindenting
C code.  There are probably a million now.  Someone who knows of a
good one can do the whole job.  As reindent.py's docstring notes:

    The hard part of reindenting is figuring out what to do with comment
    lines.


More information about the Python-3000 mailing list