| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Twisted
Revision: 24682
Author: thijs
Date: 05 Sep 2008 07:03:37
Diff at Trac: http://twistedmatrix.com/trac/changeset/24682
Changes:Adding string formatting section to coding standard.
Files:| ... | ...@@ -172,6 +172,16 @@ | |
| 172 | 172 | <code>twisted.python</code> deserves particular attention, as it may |
| 173 | 173 | not depend on any other Twisted package.</p> |
| 174 | 174 | |
| 175 | <h2>String Formatting Operations</h2> | |
| 176 | ||
| 177 | <p>When using | |
| 178 | <a href="http://docs.python.org/lib/typesseq-strings.html">string formatting operations</a> | |
| 179 | like <code>formatString % values</code> it is only allowed to use a | |
| 180 | non-tuple object for <code>values</code> if <code>formatString</code> | |
| 181 | requires a single argument. Otherwise, <code>values</code> must be a | |
| 182 | tuple with exactly the number of items specified by the format string, | |
| 183 | or a single mapping object (for example, a dictionary).</p> | |
| 184 | ||
| 175 | 185 | <h2>Docstrings</h2> |
| 176 | 186 | |
| 177 | 187 | <p>Wherever possible, docstrings should be used to describe the |