Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'd say there is almost no standard.</p> <p>I've seen two ways of indenting:</p> <pre><code>Indent 1: my_dictionary = { 'uno': 'something', 'number two': 'some other thing', } Indent 2: my_dictionary = {'uno': 'something', 'number two': 'some other thing', } </code></pre> <p>I've seen three placed to have the end bracket:</p> <pre><code>End 1: my_dictionary = {'uno': 'something', 'number two': 'some other thing', } End 2: my_dictionary = {'uno': 'something', 'number two': 'some other thing', } End 3: my_dictionary = {'uno': 'something', 'number two': 'some other thing',} </code></pre> <p>And sometimes you justify the values:</p> <pre><code>my_dictionary = {'uno': 'something', 'number two': 'some other thing', } </code></pre> <p>And sometimes even the colons:</p> <pre><code>my_dictionary = {'uno' : 'something', 'number two' : 'some other thing', } </code></pre> <p>Which looks weird.</p> <p>And sometimes you have an end comma, and sometimes not:</p> <pre><code>my_dictionary = {'uno': 'something', 'number two': 'some other thing'} </code></pre> <p>And sometimes you stick it all on one row (if it fits).</p> <pre><code>my_dictionary = {'uno': 'something', 2: 'some other thing'} </code></pre> <p>Everyone seems to have their own combination of these styles. Personally I tend towards the style you use in your example, unless there is a reason not to. Common reasons not to is when you have a dictionary as a part of a statement. Like so:</p> <pre><code>amethodthattakesadict({'hey': 'this', 'looks': 'a', 'bit': 'shitty', }) </code></pre> <p>I'd recommend that you adapt yourself to the style of the guy who wrote the code you are editing. If it's your code: Do as you like. :-)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload