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 annesylvie
Recipients annesylvie
Date 2021-03-16.16:24:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615911865.24.0.216349409983.issue43518@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-03-16 16:24:25annesylviesetrecipients: + annesylvie
2021-03-16 16:24:25annesylviesetmessageid: <1615911865.24.0.216349409983.issue43518@roundup.psfhosted.org>
2021-03-16 16:24:25annesylvielinkissue43518 messages
2021-03-16 16:24:24annesylviecreate