Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?

Thomas 'PointedEars' Lahn PointedEars at web.de
Tue May 10 20:16:30 EDT 2016


DFS wrote:

> On 5/8/2016 8:44 PM, Thomas 'PointedEars' Lahn wrote:
>> DFS wrote:
>>> sSQL =  "line 1\n"
>>> sSQL += "line 2\n"
>>> sSQL += "line 3"
>>
>> […]
>> #-----------------------------------------------------------------------
>> sSQL = ("line 1\n"
>>         "line 2\n"
>>         "line 3")
>> #-----------------------------------------------------------------------
>>
>> […]
> 
> or
> 
> sSQL = "line 1\n" \
>           "line 2\n" \
>           "line 3"
> 

Parentheses are less error-prone.

>> With the “%” string operator (deprecated),
> 
> according to who?

TFM.

>> Next time, RTFM first:
> 
> 
> Ironically, PointyHead, […]
>
>> Internet is the thing with cables; Usenet is the thing with people.  I
>> for one tend to avoid communicating with few-letter entities; exceptions
>> to that would probably include only E.T., M.J., ALF, and K.I.T.T.
> 
> How about FU?

*PLONK*

(Note to moderators: But you have let *this* through, huh?)

.
.
.
.
.
.
.
.
.
.
.
.
.

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.



More information about the Python-list mailing list