Edgewall Software

Version 4 (modified by Christopher Lenz, 19 years ago) ( diff )

Add note about line length

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

  • Lines shouldn't exceed a length of 80 characters.
  • Use list comprehension instead of the built-in functions filter() and map().

See also: TracDev

Note: See TracWiki for help on using the wiki.