1e2948a266e6c2d49a9576677a8f5990f7d510af vsmalladi Mon Oct 24 15:51:04 2011 -0700 Updated python style guide to explain package and module strucutre. Redmine #2348. diff --git python/style.txt python/style.txt index 4ceb853..3311b7e 100644 --- python/style.txt +++ python/style.txt @@ -1,28 +1,29 @@ Style Guide for Python Code Documentation Conventions Use """ doc strings to embed comments for automated documentation generator: http://epydoc.sourceforge.net/ Naming Conventions Packages and Modules All lowercase names, no spaces. Underscores if it would improve -readability in modules, but not for use in packages. Need to discuss how -classes are organized in packages and files and where programs are stored. +readability in modules, but not for use in packages. A package +contains many modules. All classes for a module exist within 1 +file. Structure follows python package and module standards. Classes CapitalCase names. Note the leading captial letter to distinguish between a ClassName and a functionName. Underscores are not used, except for private internal classes, where the name is preceded by double underscores which Python recognizes as private. Methods mixedCase names. The leading character is not captialized, but all successive words are capitalized. Underscores are not used, except for private internal methods, where the name is preceded by double underscores which Python recognizes as private. Variables mixedCase names. Underscores are not used, except for private