Version 3 (modified by 19 years ago) ( diff ) | ,
---|
Trac Coding Style
Like most Python projects, we try to adhere to PEP 8 (Style Guide for Python Code). Be sure to read that document if you intend to contribute code to Trac.
Note that some of the current Trac code violates a couple of the rules below. We are currently in the process of refactoring the offending modules so that all code uses the same conventions.
Naming conventions
- Package and module names should be all lower-case, words may be separated by underscores.
- Class names use CamelCase.
- The names of functions, variables and class members use all lower-case, with words separated by underscores.
- Internal methods and variables are prefixed with a single underscore.
Miscellaneous
- Use list comprehension instead of the built-in functions
filter()
andmap()
.
See also: TracDev
Note:
See TracWiki
for help on using the wiki.