Changes between Version 39 and Version 40 of DeveloperGuidelines/CodeConventions
- Timestamp:
- 11/16/13 23:29:01 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/CodeConventions
v39 v40 24 24 === Quotes === 25 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 '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 28 29 - for '''Inline-!JavaScript''' or JSON inside Python code use {{{''' '''}}} with single-quotes 30 - in all other cases of triple-quoted strings (such as '''Docstrings''' or Inline-XML) use {{{""" """}}} with double-quotes 29 - for Inline-!JavaScript or JSON inside Python code use {{{''' '''}}} with single-quotes 31 30 32 - for XML/HTML attributes use double-quotes {{{" "}}} (inner quotes must be escaped anyway) 33 34 Note that this: 31 Note though that this: 35 32 {{{ 36 33 #!python … … 44 41 inline_javascript = '''sometext=%s;''' % json.dumps(sometext) 45 42 }}} 43 44 - in all other cases of triple-quoted strings (such as Docstrings or Inline-XML) use {{{""" """}}} with double-quotes 45 - for XML/HTML attributes use double-quotes {{{" "}}} (inner quotes must be escaped anyway) 46 46 47 === Naming conventions === 47 48