[Python-checkins] peps: Relax __all__ location.

barry.warsaw python-checkins at python.org
Tue Jun 7 16:25:29 EDT 2016


https://hg.python.org/peps/rev/cf8e888b9555
changeset:   6352:cf8e888b9555
user:        Barry Warsaw <barry at python.org>
date:        Tue Jun 07 16:25:19 2016 -0400
summary:
  Relax __all__ location.

Put all module level dunders together in the same location, and remove
the redundant version bookkeeping information.

Closes #27187.  Patch by Ian Lee.

files:
  pep-0008.txt |  23 ++++++++---------------
  1 files changed, 8 insertions(+), 15 deletions(-)


diff --git a/pep-0008.txt b/pep-0008.txt
--- a/pep-0008.txt
+++ b/pep-0008.txt
@@ -365,8 +365,6 @@
 
   You should put a blank line between each group of imports.
 
-  Put any relevant ``__all__`` specification after the imports.
-
 - Absolute imports are recommended, as they are usually more readable
   and tend to be better behaved (or at least give better error
   messages) if the import system is incorrectly configured (such as
@@ -415,6 +413,14 @@
   public and internal interfaces still apply.
 
 
+Dunder Variables
+----------------
+
+All relevant dunder variables (e.g. ``__all__``, ``__author__``,
+``__version__``, etc) should be placed after the module docstring and
+before any imports, separated by a blank line above and below.
+
+
 String Quotes
 =============
 
@@ -689,19 +695,6 @@
   the same line.
 
 
-Version Bookkeeping
-===================
-
-If you have to have Subversion, CVS, or RCS crud in your source file,
-do it as follows. ::
-
-    __version__ = "$Revision$"
-    # $Source$
-
-These lines should be included after the module's docstring, before
-any other code, separated by a blank line above and below.
-
-
 Naming Conventions
 ==================
 

-- 
Repository URL: https://hg.python.org/peps


More information about the Python-checkins mailing list