Changes between Version 31 and Version 32 of DeveloperGuidelines/CodeConventions
- Timestamp:
- 11/16/13 22:55:41 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/CodeConventions
v31 v32 11 11 * http://code.google.com/p/soc/wiki/PythonStyleGuide 12 12 * 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]) 14 14 * Global variables should be avoided - use response.s3 to store them. 15 15 … … 21 21 python static/scripts/tools/pep8.py yourfile.py 22 22 }}} 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) 23 33 24 34 === Naming conventions ===