Edgewall Software

Changes between Version 10 and Version 11 of TracDev/CodingStyle


Ignore:
Timestamp:
Sep 9, 2009, 8:18:27 PM (15 years ago)
Author:
Remy Blank
Comment:

Added a note about global declarations.

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/CodingStyle

    v10 v11  
    1919   No, it's not because we're mainly using VT100 terminals while developing Trac,
    2020   rather because the diffs look nicer on short lines, especially in side-by-side mode.
    21  * ''never'' use multiple statements on the same line, e.g. `if check: a = 0`.
     21 * ''Never'' use multiple statements on the same line, e.g. `if check: a = 0`.
    2222 * Prefer list comprehension to the built-in functions `filter()` and `map()` when appropriate.
    2323 * Use `raise TracError("message")` instead of `raise TracError, "message"`
     24 * Only use a `global` declaration in a function if that function actually modifies a global variable.
    2425 * A little difference from PEP:0257: we usually don't ''insert a blank line between the last paragraph in a multi-line docstring and its closing quotes''.
    2526 * Also, in docstrings, we make quite a liberal usage of WikiFormatting.