_______________________________
>From: eryksun <[email protected]>
>To: Jim Mooney <[email protected]> 
>Cc: [email protected] 
>Sent: Tuesday, June 25, 2013 2:14 PM
>Subject: Re: [Tutor] mistaken about splitting expressions over lines

<snip>

>
>    >>> a = ('this'  # this way
>    ...      ' string' ' is long') # is more flexible
>    >>> a
>    'this string is long'

 
I did something similar after having read 
http://docs.python.org/2/howto/doanddont.html, under "Using Backslash to 
Continue Statements".
 
But I always use + signs. I didn't know that omitting them also works. Is 
str.__add__ called then, too?
Isn't this a violation of the 'Explicit is better than implicit(ly concatenate 
strings)' principle?
>>> a = ('this' +
              ' string' +
              ' is long')
>>> a
'this string is long'
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to