assigning multi-line strings to variables

Lie Ryan lie.1296 at gmail.com
Thu Apr 29 15:41:26 EDT 2010


On 04/29/10 20:40, Gregory Ewing wrote:
> Lie Ryan wrote:
>> No, the implicit concatenation is there because Python didn't always
>> have triple quoted string. Nowadays it's an artifact and triple quoted
>> string is much preferred.
> 
> I don't agree. I often use implicit concatenation when I'm
> writing a format string that won't fit on one source line,
> because it allows me to fit it into the surrounding indentation
> structure without introducing unwanted spaces into the string.
> 
> Both tecnhiques have their places.
> 

That statement should be quantified with "for large chunks of text".
Format string is typically 2-3 lines at most, not enough to qualify as
large chunk.



More information about the Python-list mailing list