[issue18585] Add a text truncation function
Antoine Pitrou
report at bugs.python.org
Mon Jul 29 15:55:30 CEST 2013
Antoine Pitrou added the comment:
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...'
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18585>
_______________________________________
More information about the Python-bugs-list
mailing list