[Python-Dev] A can of worms... (does Python C code have a new C style?)

Barry Warsaw barry at python.org
Wed May 31 14:10:34 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 31 May 2006 07:02:02 -0400
"Martin Blais" <blais at furius.ca> wrote:

> I'd like to know what the policy is on the source code indentation for
> C code in the interpreter.  At the Need-for-Speed sprints, there was
> consensus that there is a "new" indentation for style for the Python C
> source files, with
> 
> * indentation (emacs: c-basic-offset): 4 chars
> * no tabs (so tab-width does not matter)
> * 79 chars max for lines (I think)
> 
> (Correct me if any of this is wrong.)  I cannot find where this
> discussion comes from, PEP 7 seems to imply that the new style only
> applies to Python 3k.  Is this correct?

AFAIK, yes it only applies to Py3K.  There are no plans to re-indent the
Python 2.x C code.  Or maybe, there have been plans to do so for > 10
years and in Py3K those plans might finally come to fruition. :)

BTW, A while back I think I posted a "py3k" cc-mode style for you
X/Emacs hackers out there.  It's based on the standard "python" style
but changes c-basic-offset and indent-tabs-mode.  Let me know if you
can't find it in the archives.

- -Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iQCVAwUBRH2HvnEjvBPtnXfVAQJv/wQAhKBvh49xW59JgKv6tq9O/QvU/jvZJSPw
qHMjOi55IGdFUG4zrSOH08U0VSkkM/mhoBgAqggNnsWMsFjtEu0NeOcroKIPBmLK
RU1B4sw78RQFj/phEBpCvgObYRoI8lEVJYnXKFAp6yY9qGdJRGIRGhVX5nnBz/as
4BLr5tADpHo=
=IFzC
-----END PGP SIGNATURE-----


More information about the Python-Dev mailing list