Changes between Version 38 and Version 39 of DeveloperGuidelines/CodeConventions


Ignore:
Timestamp:
11/16/13 23:27:58 (11 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/CodeConventions

    v38 v39  
    2424=== Quotes ===
    2525
    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 '
    2828
    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
     30- in all other cases of triple-quoted strings (such as '''Docstrings''' or Inline-XML) use {{{""" """}}} with double-quotes
    3131
    3232- for XML/HTML attributes use double-quotes {{{" "}}} (inner quotes must be escaped anyway)
     
    3737inline_javascript = '''sometext="%s";''' % sometext
    3838}}}
    39 is a potential bug - the !JavaScript breaks when {{{sometext}}} contains a {{{"}}}.
     39is a '''potential bug''' - the !JavaScript breaks when {{{sometext}}} contains a {{{"}}}.
    4040
    4141A safer way to do that is: