[Python-checkins] r45692 - peps/trunk/pep-0007.txt peps/trunk/pep-3100.txt

guido.van.rossum python-checkins at python.org
Mon Apr 24 20:52:09 CEST 2006


Author: guido.van.rossum
Date: Mon Apr 24 20:52:08 2006
New Revision: 45692

Modified:
   peps/trunk/pep-0007.txt
   peps/trunk/pep-3100.txt
Log:
Record that the Py3k C coding style will use 4 spaces, no tabs.
And record when it's okay to reformat a file to conform.


Modified: peps/trunk/pep-0007.txt
==============================================================================
--- peps/trunk/pep-0007.txt	(original)
+++ peps/trunk/pep-0007.txt	Mon Apr 24 20:52:08 2006
@@ -28,6 +28,9 @@
 C dialect
 
     - Use ANSI/ISO standard C (the 1989 version of the standard).
+      This means (amongst many other things) that all declarations
+      must be at the top of a block (not necessarily at the top of
+      function).
 
     - Don't use GCC extensions (e.g. don't write multi-line strings
       without trailing backslashes).
@@ -44,6 +47,7 @@
 Code lay-out
 
     - Use single-tab indents, where a tab is worth 8 spaces.
+      (For Python 3000, see the section Python 3000 below.)
 
     - No line should be longer than 79 characters.  If this and the
       previous rule together don't give you enough room to code, your
@@ -189,6 +193,13 @@
       not all do; the MSVC compiler is known to complain about this.
 
 
+Python 3000
+
+    In Python 3000, we'll switch to a different indentation style:
+    4 spaces per indent, all spaces (no tabs in any file).  The
+    rest will remain the same.
+
+
 References
 
     [1] PEP 8, Style Guide for Python Code, van Rossum, Warsaw

Modified: peps/trunk/pep-3100.txt
==============================================================================
--- peps/trunk/pep-3100.txt	(original)
+++ peps/trunk/pep-3100.txt	Mon Apr 24 20:52:08 2006
@@ -50,6 +50,16 @@
 * PEP 352 (Required Superclass for Exceptions) [#pep352]_
 
 
+Style changes
+=============
+
+* The C style guide will be updated to use 4-space indents, never tabs.
+  This style should be used for all new files; existing files can be
+  updated only if there is no hope to ever merge a particular file from 
+  the Python 2 HEAD.  Within a file, the indentation style should be
+  consistent.  No other style guide changes are planned ATM.
+
+
 Core language
 =============
 


More information about the Python-checkins mailing list