<p dir="ltr">On Oct 11, 2016 10:40 AM, "Erik Bray" <<a href="mailto:erik.m.bray@gmail.com">erik.m.bray@gmail.com</a>> wrote:<br>
><br>
> On Sun, Oct 9, 2016 at 2:25 AM, Steven D'Aprano <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>> wrote:<br>
> > On Sat, Oct 08, 2016 at 09:26:13PM +0200, Jelte Fennema wrote:<br>
> >> I have an idea to improve indenting guidelines for dictionaries for better<br>
> >> readability: If a value in a dictionary literal is placed on a new line, it<br>
> >> should have (or at least be allowed to have) a n additional hanging indent.<br>
> >><br>
> >> Below is an example:<br>
> >><br>
> >> mydict = {'mykey':<br>
> >>               'a very very very very very long value',<br>
> >>           'secondkey': 'a short value',<br>
> >>           'thirdkey': 'a very very very '<br>
> >>               'long value that continues on the next line',<br>
> >> }<br>
> ><br>
> > Looks good to me, except that my personal preference for the implicit<br>
> > string concatenation (thirdkey) is to move the space to the<br>
> > following line, and (if possible) align the parts:<br>
> > mydict = {'mykey':<br>
> >               'a very very very very very long value',<br>
> >           'secondkey': 'a short value',<br>
> >           'thirdkey': 'a very very very'<br>
> >                       ' long value that continues on the next line',<br>
> >           }<br>
><br>
> Heh--not to bikeshed, but my personal preference is to leave the<br>
> trailing space on the first line.  This is because by the time I've<br>
> started a new line (and possibly have spent time fussing with<br>
> indentation for the odd cases that my editor doesn't get quite right)<br>
> I'll have forgotten that I need to start the line with a space :)</p>
<p dir="ltr">Until you end up with like 20 merge conflicts because some editors strip trailing whitespace...</p>
<p dir="ltr">><br>
> Best,<br>
> Erik<br>
> _______________________________________________<br>
> Python-ideas mailing list<br>
> <a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/python-ideas">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
> Code of Conduct: <a href="http://python.org/psf/codeofconduct/">http://python.org/psf/codeofconduct/</a></p>
<p dir="ltr">--<br>
Ryan<br>
[ERROR]: Your autotools build scripts are 200 lines longer than your program. Something’s wrong.<br>
<a href="http://kirbyfan64.github.io/">http://kirbyfan64.github.io/</a></p>