Which indentation style do you all prefer for expanding brackets?

Posted by sasson10@reddit | Python | View on Reddit | 56 comments

I just got curious as to what the more popular style of indentation is when expanding brackets into multiple lines.

This applies to everything, but I'll use a list as an example, the base list will be l = [item1, item2, item3]

  1. Going down a line and 1 indent level forward from the very first time item
l = [
    item1,
    item2,
    item3
]
  1. Keeping the first item on the definition line, then adding spaces so everything lines up
l = [item1,
     item2,
     item3]

These are the main 2 I've seen in my time, if you have any others I'd be interested to see them as well