Author ncoghlan
Recipients ncoghlan
Date 2012-01-25.03:37:14
SpamBayes Score 0.00175415
Marked as misclassified No
Message-id <>
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)
Date User Action Args
2012-01-25 03:37:16ncoghlansetrecipients: + ncoghlan
2012-01-25 03:37:15ncoghlansetmessageid: <>
2012-01-25 03:37:15ncoghlanlinkissue13857 messages
2012-01-25 03:37:14ncoghlancreate