Преглед на файлове

note Python pep08

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@53783 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa преди 12 години
родител
ревизия
cb9b55bb0f
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 8 0
      SUBMITTING_PYTHON

+ 8 - 0
SUBMITTING_PYTHON

@@ -8,6 +8,7 @@ care of following rules:
 [ see SUBMITTING      for C hints ]
 [ see SUBMITTING      for C hints ]
 [ see SUBMITTING_DOCS for documentation ]
 [ see SUBMITTING_DOCS for documentation ]
 
 
+See also http://www.python.org/dev/peps/pep-0008/
 
 
 0.  Indentation
 0.  Indentation
 
 
@@ -19,10 +20,12 @@ care of following rules:
     See also "Python Style Guide" by Guido van Rossum
     See also "Python Style Guide" by Guido van Rossum
     http://www.python.org/doc/essays/styleguide.html
     http://www.python.org/doc/essays/styleguide.html
 
 
+
 1.  Instructions for the GRASS script parser can be found in the g.parser 
 1.  Instructions for the GRASS script parser can be found in the g.parser 
     module's help page.
     module's help page.
     http://grass.osgeo.org/grass70/manuals/html70_user/g.parser.html
     http://grass.osgeo.org/grass70/manuals/html70_user/g.parser.html
 
 
+
 2.  Use the directory structure to place your script appropriately into
 2.  Use the directory structure to place your script appropriately into
     the source tree
     the source tree
     	- scripts go into scripts/
     	- scripts go into scripts/
@@ -30,6 +33,7 @@ care of following rules:
     Also add a Makefile and a <module>.html file into this directory.
     Also add a Makefile and a <module>.html file into this directory.
     See existing Python scripts for examples.
     See existing Python scripts for examples.
 
 
+
 3.  Add a header section to the script you submit and make sure you
 3.  Add a header section to the script you submit and make sure you
     include the copyright. The purpose section is meant to contain a
     include the copyright. The purpose section is meant to contain a
     general over view of the code in the file to assist other
     general over view of the code in the file to assist other
@@ -64,9 +68,11 @@ COPYRIGHT: (C) 2007 John Doe, and by the GRASS Development Team
     Just select an existing module which is close to your application to save
     Just select an existing module which is close to your application to save
     efforts.
     efforts.
 
 
+
 4.  We don't want the $ ID $ in source code any more as it causes problems
 4.  We don't want the $ ID $ in source code any more as it causes problems
     for the branches.
     for the branches.
 
 
+
 5.  Create and use secure temporary files and directories. Use the
 5.  Create and use secure temporary files and directories. Use the
     grass.tempfile() or grass.tempdir() functions to do this. e.g.
     grass.tempfile() or grass.tempdir() functions to do this. e.g.
 
 
@@ -75,6 +81,7 @@ COPYRIGHT: (C) 2007 John Doe, and by the GRASS Development Team
 	if TMP is None:
 	if TMP is None:
 	    grass.fatal("Unable to create temporary files")
 	    grass.fatal("Unable to create temporary files")
 	    
 	    
+
 6.  Use grass.findfile() when there is a need to test if a map exists.
 6.  Use grass.findfile() when there is a need to test if a map exists.
 
 
 	# test for input raster map
 	# test for input raster map
@@ -111,6 +118,7 @@ COPYRIGHT: (C) 2007 John Doe, and by the GRASS Development Team
 
 
     Try to omit any usage of the 'print' command for informational output.
     Try to omit any usage of the 'print' command for informational output.
 
 
+
 8.  PLEASE take the time to add comments throughout your code explaining what
 8.  PLEASE take the time to add comments throughout your code explaining what
     the code is doing. It will save a HUGE amount of time and frustration for
     the code is doing. It will save a HUGE amount of time and frustration for
     other programmers that may have to change your code in the future.
     other programmers that may have to change your code in the future.