Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #18802
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: Newbie: Looking for code review on my first Python project. |
| Date | 2012-01-10 22:59 -0500 |
| References | <jeiig6$csj$1@news.albasani.net> <CAPTjJmrH2a9GfVUMhcH0rkuq3cerYzv8-Oaw2FDrm3zEAUbxJw@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4626.1326254390.27778.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Newbie: Looking for code review on my first Python project. HoneyMonster <someone@someplace.invalid> - 2012-01-10 23:44 +0000
Re: Newbie: Looking for code review on my first Python project. Ian Kelly <ian.g.kelly@gmail.com> - 2012-01-10 18:17 -0700
Re: Newbie: Looking for code review on my first Python project. HoneyMonster <someone@someplace.invalid> - 2012-01-11 11:39 +0000
Re: Newbie: Looking for code review on my first Python project. HoneyMonster <someone@someplace.invalid> - 2012-01-11 21:09 +0000
Re: Newbie: Looking for code review on my first Python project. 88888 Dihedral <dihedral88888@googlemail.com> - 2012-01-11 16:24 -0800
Re: Newbie: Looking for code review on my first Python project. Chris Angelico <rosuav@gmail.com> - 2012-01-11 12:43 +1100
Re: Newbie: Looking for code review on my first Python project. Ben Finney <ben+python@benfinney.id.au> - 2012-01-11 13:05 +1100
Re: Newbie: Looking for code review on my first Python project. Terry Reedy <tjreedy@udel.edu> - 2012-01-10 20:50 -0500
Re: Newbie: Looking for code review on my first Python project. Terry Reedy <tjreedy@udel.edu> - 2012-01-10 22:59 -0500
Re: Newbie: Looking for code review on my first Python project. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-11 04:24 +0000
Re: Newbie: Looking for code review on my first Python project. Ben Finney <ben+python@benfinney.id.au> - 2012-01-11 16:23 +1100
csiph-web