New submission from annesylvie <[email protected]>:

The `shorten` function from the `textwrap` module does not always break strings 
at the correct location.

`shorten("hello world!", width=7, placeholder="")`
 returns
`'hello'`
as expected, but
`shorten("hello world!!!!!!", width=7, placeholder="")`
returns
`'hello w'`
which is incorrect. The error seems to appear when two or more exclamation 
marks (in this specific example) are added.

----------

_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43518>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to