On Fri, Nov 12, 2010 at 2:09 AM, Simon Schampijer <<a href="mailto:simon@schampijer.de">simon@schampijer.de</a>> wrote:<br>> In general I would do what the spec says if there is no good reason not to<br>> [1]. The example they have does not really handle all the cases, though.<br>
> Neither pep8 nor pylint does favor any formatting. So I guess we are a bit<br>> free here.<br><br>I belive PEP8's example is rather definitive:<br><br><font class="Apple-style-span" face="'courier new', monospace">"... Make sure to indent the continued line appropriately.  The preferred place to break around a binary operator is *after* the operator, not before it.  Some examples:<br>
<br>    class Rectangle(Blob):<br><br>        def __init__(self, width, height,<br>                     color='black', emphasis=None, highlight=0):<br>            if width == 0 and height == 0 and \<br>               color == 'red' and emphasis == 'strong' or \<br>
               highlight > 100:<br>                raise ValueError("sorry, you lose")<br>            if width == 0 and height == 0 and (color == 'red' or<br>                                               emphasis is None):<br>
                raise ValueError("I don't think so -- values are %s, %s" %<br>                                 (width, height))<br>            Blob.__init__(self, width, height,<br>                          color, emphasis, highlight)<br>
</font><br><div>I don't think there's any ambiguity there, actually.</div><div>  --scott</div><div><br>-- <br>                         ( <a href="http://cscott.net/">http://cscott.net/</a> )<br><br></div>