On 1/10/2012 8:43 PM, Chris Angelico wrote:
about = "Built by Walter Hurry using Python and wxPython,\n" + \
"with wxGlade to generate the code for the GUI elements.\n" + \
"Phil Lewis' get_iplayer does the real work.\n\n" + \
"Version 1.05: January 10, 2012"
I'd do this with a triple-quoted string:
about = """Built by Walter Hurry using Python and wxPython,
with wxGlade to generate the code for the GUI elements.
Phil Lewis' get_iplayer does the real work.
I would too, but if you prefer the indentation, just leave out the '+'s
and let Python do the catenation when compiling:
>>> s = "abc\n" \
"def\n"\
"ghi"
>>> s
'abc\ndef\nghi'
--
Terry Jan Reedy
--
http://mail.python.org/mailman/listinfo/python-list