Message151932
| Author |
ncoghlan |
| Recipients |
ncoghlan |
| Date |
2012年01月25日.03:37:14 |
| SpamBayes Score |
0.0017541457 |
| Marked as misclassified |
No |
| Message-id |
<1327462635.84.0.618726818638.issue13857@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
As far I am aware, the simplest way to indent a multi-line string is with the following snippet:
'\n'.join((4 * ' ') + x for x in s.splitlines())
It would be a lot simpler and clearer if I could just write that as "textwrap.indent(s, 4 * ' ')".
(i.e. indent would accept a prefix string to be inserted before each line in the supplied string, as in the original comprehension) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年01月25日 03:37:16 | ncoghlan | set | recipients:
+ ncoghlan |
| 2012年01月25日 03:37:15 | ncoghlan | set | messageid: <1327462635.84.0.618726818638.issue13857@psf.upfronthosting.co.za> |
| 2012年01月25日 03:37:15 | ncoghlan | link | issue13857 messages |
| 2012年01月25日 03:37:14 | ncoghlan | create |
|