[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/doc/pegboard/coding_standard--vegai peg.rst
From: |
Vesa Kaihlavirta |
Subject: |
[Gzz-commits] gzz/doc/pegboard/coding_standard--vegai peg.rst |
Date: |
Thu, 09 Jan 2003 12:22:26 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Vesa Kaihlavirta <address@hidden> 03/01/09 12:22:26
Modified files:
doc/pegboard/coding_standard--vegai: peg.rst
Log message:
Changes based on recent discussion.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/doc/pegboard/coding_standard--vegai/peg.rst.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: gzz/doc/pegboard/coding_standard--vegai/peg.rst
diff -u gzz/doc/pegboard/coding_standard--vegai/peg.rst:1.4
gzz/doc/pegboard/coding_standard--vegai/peg.rst:1.5
--- gzz/doc/pegboard/coding_standard--vegai/peg.rst:1.4 Thu Jan 9 11:23:26 2003
+++ gzz/doc/pegboard/coding_standard--vegai/peg.rst Thu Jan 9 12:22:26 2003
@@ -3,8 +3,8 @@
=============================================================
:Author: Vesa Kaihlavirta
-:Last-Modified: $Date: 2003/01/09 16:23:26 $
-:Revision: $Revision: 1.4 $
+:Last-Modified: $Date: 2003/01/09 17:22:26 $
+:Revision: $Revision: 1.5 $
:Status: Current
:Scope: Minor
:Type: ?
@@ -19,43 +19,45 @@
These apply to all \*.py (and possibly \*.test).
1. Header comments should include full module name of the file (eg.
-gzz/modules/pp/demotest.py would have gzz.modules.pp.demotest).
+ gzz/modules/pp/demotest.py would have gzz.modules.pp.demotest).
2. Header comments should include authors.
3. After header comments, rcsid:
-rcsid = "$Id: peg.rst,v 1.4 2003/01/09 16:23:26 Vegai Exp $"
+ rcsid = "$Id: peg.rst,v 1.5 2003/01/09 17:22:26 Vegai Exp $"
4. After rcsid, the imports (unless there's a good reason to delay
-importing).
+ importing).
- - Prefer "import foo" to "from foo import bar".
- - Prefer "from foo import bar" to "from foo import \*".
- - No more than one import package in one line, eg.::
+ - Prefer "import foo" to "from foo import bar".
+ - Prefer "from foo import bar" to "from foo import \*".
+ - No more than one import package in one line, except when importing gzz
+ and java::
- import os, sys # NO
+ import os, sys # Preferably no.
- import os # Yes.
+ import os # Yes.
import sys
+ import gzz, java # Yes.
+
+
5. Imports should be grouped in the following order:
- - standard python imports
- - 3rd party python imports
- - java imports
- - gzz imports
+ - standard python imports
+ - 3rd party python imports
+ - java imports
+ - gzz imports
6. All code and data should preferably reside inside a class.
7. Class names are CapitalizedWords.
-8. Class methods are mixedCase.
-
-9. Class attributes are lowercase.
+8. Class methods and attributes are mixedCase.
-10. Tab-size is 4.
+9. Tab-size is 4.
-11. Never use tabs.
+10. Never use tabs.
Questions
- [Gzz-commits] gzz/doc/pegboard/coding_standard--vegai peg.rst, Vesa Kaihlavirta, 2003/01/09
- [Gzz-commits] gzz/doc/pegboard/coding_standard--vegai peg.rst, Vesa Kaihlavirta, 2003/01/09
- [Gzz-commits] gzz/doc/pegboard/coding_standard--vegai peg.rst, Vesa Kaihlavirta, 2003/01/09
- [Gzz-commits] gzz/doc/pegboard/coding_standard--vegai peg.rst,
Vesa Kaihlavirta <=
- [Gzz-commits] gzz/doc/pegboard/coding_standard--vegai peg.rst, Vesa Kaihlavirta, 2003/01/09
- [Gzz-commits] gzz/doc/pegboard/coding_standard--vegai peg.rst, Tuomas J. Lukka, 2003/01/10
- [Gzz-commits] gzz/doc/pegboard/coding_standard--vegai peg.rst, Vesa Kaihlavirta, 2003/01/12
- [Gzz-commits] gzz/doc/pegboard/coding_standard--vegai peg.rst, Vesa Kaihlavirta, 2003/01/12
- [Gzz-commits] gzz/doc/pegboard/coding_standard--vegai peg.rst, Vesa Kaihlavirta, 2003/01/13