On Thu, Oct 18, 2012 at 9:47 AM, Dave Angel <span dir="ltr"><<a href="mailto:d@davea.name" target="_blank">d@davea.name</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5">On 10/18/2012 12:26 PM, Chris Angelico wrote:<br>
> On Fri, Oct 19, 2012 at 3:16 AM, Evan Driscoll <<a href="mailto:driscoll@cs.wisc.edu">driscoll@cs.wisc.edu</a>> wrote:<br>
>>    Python isn't as bad as C++ though (my main other language), where<br>
>>    80 characters can go by *very* quickly.<br>
>><br>
>> 2. Backslash continuations are *terrible*. I hate them with a firery<br>
>>    passion. :-) A line could be 1000 characters long and it would be<br>
>>    better than a 120-character line backslash-continued.<br>
> I have one mid-sized C++ project at work that's pretty much<br>
> exclusively under my control. There is precisely ONE place where<br>
> backslash continuations crop up, and that's long strings that want to<br>
> be formatted on multiple lines (eg huge SQL statements) - in Python,<br>
> they'd be trip-quoted. We don't have *any* backslash continuations in<br>
> Python code.<br>
><br>
><br>
<br>
</div></div>But both C++ and Python have automatic concatenation of adjacent<br>
strings.  So you can just start and end each line with a quote, and<br>
leave off the backslash.<br></blockquote><div><br></div><div>That will work in C++ as the statements won't terminate on new-line (only on semi-colon), however in Python that won't work as the statement will terminate at the end of the line. You can get around this by wrapping the multiple strings inside of parentheses.</div>

</div>