j: Next unread message
k: Previous unread message
j a: Jump to all threads
j l: Jump to MailingList overview
Steven Bethard wrote:
On 5/2/07, Michael Foord email@example.com wrote:
Implicit string concatenation is massively useful for creating long strings in a readable way though:
call_something("first part\n" "second line\n" "third line\n")
I find it an elegant way of building strings and would be sad to see it go. Adding trailing '+' signs is ugly.
You'll still have textwrap.dedent::
call_something(dedent('''\ first part second line third line '''))
And using textwrap.dedent, you don't have to remember to add the \n at the end of every line.
But if you don't want the EOLs? Example from some code of mine:
raise MakeError("extracting '%s' in '%s' did not create the " "directory that the Python build will expect: " "'%s'" % (src_pkg, dst_dir, dst))
I use this kind of thing frequently. Don't know if others consider it bad style.
-- Trent Mick trentm at activestate.com