Changeset 24682

Show
Ignore:
Timestamp:
09/05/2008 07:03:37 AM (10 months ago)
Author:
thijs
Message:
Adding string formatting section to coding standard.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/string-format-standard-3045/doc/development/policy/coding-standard.xhtml

    r24613 r24682  
    172172    <code>twisted.python</code> deserves particular attention, as it may 
    173173    not depend on any other Twisted package.</p> 
     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> 
    174184 
    175185    <h2>Docstrings</h2>