Which of the following three are preferred under our interpretation of PEP8?
To short-circuit the discussion: I naturally write #1. In part because I want to be able to minimize number of lines changed when adding and removing things from lists.
I’m OK with #2.
But only #3 passes PEP8 flake8 (with the RFC config file).
I personally prefer (1), and I tend to use something similar for function calls or definitions that extend beyond one line. I think it’s the only one of these options that scales to the next level (when one of the dict values extends beyond one line, or you have a nested dict).
I prefer to put the closing brace at the same indentation as the variable definition, but I don’t care about that all that much:
I’ve no great preference over where the closing brace goes (except emacs naturally does option #1 for me and it’s a pain to fix it). But I really don’t like the following:
kwargs = {
'good_mag_limit': good_mag_limit,
'medianAstromscatterRef': medianAstromscatterRef,
'medianPhotoscatterRef': medianPhotoscatterRef,
'matchRef': matchRef,
} # for any placement of this brace