Coding Convention

The coding convention is pretty much that described in pep-0008

   1 import module.not.ShortName as ShortName
   2 
   3 def module_function():
   4     print "I am a function"
   5 
   6 class ClassName(ParentClass)
   7     """
   8     I am a comment
   9     """
  10 
  11     CONSTANT_VALUE = 7
  12 
  13     def __init__(self):
  14         ParentClass.__init__(self)
  15         #Small comment
  16         self.variableName = 42
  17         self.bar = None
  18 
  19         self.setup_function_call()
  20 
  21     def _private_functions_go_first(self, *args):
  22         pass
  23 
  24     @classmethod
  25     def class_or_static_methods(self, baz):
  26         pass
  27 
  28     def public_function(self, foo):
  29         if foo == 42:
  30             self.long_named_function_call(
  31                         parameter1,
  32                         parameter2)
  33         elif foo == False:
  34             self.variableName = ClassName.CONSTANT_VALUE
  35         else:
  36             raise Exception("Bah!")

Changelog

Commits should include a ChangeLog describing the change. I recommend generating this with markupprepate-ChangeLog.pl or any tool which outputs ChangeLogs in the following format.

2008-02-12  John Stowers  <john.stowers@gmail.com>

        * conduit/Settings.py:
        * conduit/gtkui/UI.py: Make the rgba colormap a gconf option until I can
        work out why it corrupts screen rendering on my system
        
        * conduit/modules/FileModule/FileConfiguration.py: Finally save and restore
        the selected folder correctly. Fixes bug #510523

Attic/Conduit/CodingConvention (last edited 2019-01-12 21:52:36 by AndreKlapper)