Changes between Version 31 and Version 32 of DeveloperGuidelines/CodeConventions


Ignore:
Timestamp:
11/16/13 22:55:41 (8 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/CodeConventions

    v31 v32  
    1111* http://code.google.com/p/soc/wiki/PythonStyleGuide
    1212 * Limit line length to 80 characters
    13 * Use " " for strings, UNLESS the string contains a ", in which case use '
     13* Use " " for strings, UNLESS the string contains a ", in which case use ' (see also [#Quotes Quotes])
    1414* Global variables should be avoided - use response.s3 to store them.
    1515
     
    2121python static/scripts/tools/pep8.py yourfile.py
    2222}}}
     23
     24=== Quotes ===
     25
     26- for string constants in Python use double quotes " " - UNLESS the string contains "
     27- for string constants in JavaScript use single quotes ' ' - UNLESS the string contains a '
     28
     29- for Inline-JavaScript or JSON inside Python code use ''' '''
     30- in all other cases of triple-quoted strings (such as docstrings or Inline-XML) use """ """
     31
     32- for XML/HTML attributes use double quotes " " (inner quotes must be escaped anyway)
    2333
    2434=== Naming conventions ===