_______________________________
>From: eryksun <eryk...@gmail.com>
>To: Jim Mooney <cybervigila...@gmail.com> 
>Cc: tutor@python.org 
>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  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to