[issue18585] Add a text truncation function

Vajrasky Kok report at bugs.python.org
Mon Jul 29 18:09:02 CEST 2013


Vajrasky Kok added the comment:

Something is not right if we use more than one space.

>>> textwrap.summarize('hello      world!', width=12)
'hello world!'
>>> textwrap.summarize('hello      world!', width=11)
'hello (...)'
>>> textwrap.summarize('hello      world!', width=10)
'(...)'

I expect the last statement would give result: 'hello (...)' because 'hello' is just 5 characters, less than 10.

----------
nosy: +vajrasky

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


More information about the Python-bugs-list mailing list