This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients barry, ezio.melotti, georg.brandl, pitrou, python-dev, r.david.murray, serhiy.storchaka, steven.daprano, vajrasky
Date 2013-08-12.21:22:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376342531.01.0.377875701825.issue18585@psf.upfronthosting.co.za>
In-reply-to
Content
What about a multiline summarize? The textwrap module is designed to work with multiline text.

Let we want wrap 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' in 40 column and shorten it to three lines:

Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore (...)

For this we need to add two arguments for TextWrapper: max_lines and placeholder. Then shorten() will be just fill() with max_lines=1.
History
Date User Action Args
2013-08-12 21:22:11serhiy.storchakasetrecipients: + serhiy.storchaka, barry, georg.brandl, pitrou, ezio.melotti, steven.daprano, r.david.murray, python-dev, vajrasky
2013-08-12 21:22:11serhiy.storchakasetmessageid: <1376342531.01.0.377875701825.issue18585@psf.upfronthosting.co.za>
2013-08-12 21:22:10serhiy.storchakalinkissue18585 messages
2013-08-12 21:22:10serhiy.storchakacreate