[issue18585] Add a text truncation function

Barry A. Warsaw report at bugs.python.org
Mon Jul 29 17:20:38 CEST 2013


Barry A. Warsaw added the comment:

On Jul 29, 2013, at 01:55 PM, Antoine Pitrou wrote:

>Perhaps the "placeholder" argument should actually include the last whitespace, to allow people to omit the whitespace, or use a non-breaking space instead?
>
>   >>> textwrap.summarize("Hello  world!", width=11, placeholder='...')
>   'Hello...'

I guess the placeholder default is ' (...)' then?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18585>
_______________________________________


More information about the Python-bugs-list mailing list