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

Nick Coghlan ncoghlan at gmail.com
Thu Mar 23 03:11:49 CET 2006


Brett Cannon wrote:
> On 3/22/06, Thomas Wouters <thomas at python.org> wrote:
> [SNIP]
>> Speaking of PEP-3007, any ideas on how different from PEP-0007 it'll be?
>> tabs or four-space indents? How rigourously will it be applied? (I honestly
>> don't have any problems with PEP-0007 except for its intermittent
>> application.) Do we get to arbitrarily clean up extensions and the like? :>
> 
> 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, but over the years it has made the C code a pain to edit
> since you have to pay attention to the formatting of the code around
> where you are touching which can vary from file to file, making
> multi-file patches a pain to review.  Plus if we require this before
> we add new code in it will help guarantee at least a basic code
> review.

I would love it if PEP 3007 standardised on 4-space indents, the same as the 
standard for Python code in the standard lib. I'd love it even more if 
reindent.py cleaned up C whitespace as well as Python whitespace. These days, 
getting any C file to display properly involves tinkering with my editor's 
indentation and tab display settings. . .

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-3000 mailing list