assigning multi-line strings to variables

Alf P. Steinbach alfps at
Fri Apr 30 16:01:39 CEST 2010

On 30.04.2010 12:51, * Lie Ryan:
> On 04/30/10 12:07, Alf P. Steinbach wrote:
>> On 30.04.2010 01:29, * Carl Banks:
>>> On Apr 28, 11:16 am, "Alf P. Steinbach"<al... at>   wrote:
>>>> On 28.04.2010 18:54, * Lie Ryan:
>>>>> Python have triple-quoted string when you want to include large amount
>>>>> of text;
>>>> Yes, that's been mentioned umpteen times in this thread, including
>>>> the *very
>>>> first* quoted sentence above.
>>>> It's IMHO sort of needless to repeat that after quoting it, and
>>>> providing yet
>>>> another example right after quoting an example.
>>>> Probably you didn't notice?
>>> I think he repeated it just to let people know that they can get what
>>> they want without following your adsurd advice.
>> Perhaps you could quote the advice that you find absurd, and explain how
>> you interpret the quoted text?
>> My previous experience with you is that you immediately called me
>> "insane" (and worse) for suggesting a solution that could work in
>> principle and did work in practice for the problem posed in that thread;
>> I think you resorted to such characterizations because you had stated
>> that it was impossible.
> I don't know about your feud with Carl, but for this particular thread,
> the problem is that your solution involves much more manual work than is
> necessary. Even worse, you suggested to "write a Python script to format
> it for you". That is the worse piece of advice I've ever heard.

If you have a 5K string without line breaks, say, then it's entirely reasonable 
to write a script to split it up, depending on your fav editor's lack of 
functionality for that. Perhaps you'd like to do it manually. I don't.

> Yes, your advices works perfectly if you follow it; except that it adds
> something to my worklist instead of lifting it.

No, you simply haven't thought it through.

I suspect that you have formed some silly idea in your mind about what I wrote 
meant, and that that in-your-mind silly idea is what you're arguing against, for 
otherwise your comments do not make sense (like, you state that saving work adds 

Cheers & hth.,

- Alf

More information about the Python-list mailing list