You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The standard lib textwrap.shorten truncates words, not single characters. And there doesn't seem a way to configure shorten() or a TextWrapper instance to clip single characters and not words.
The standard lib
textwrap.shorten
truncates words, not single characters. And there doesn't seem a way to configure shorten() or a TextWrapper instance to clip single characters and not words.See also comments in:
https://stackoverflow.com/a/39017530/6626292
Proposal implementation:
The function name
shorten
may change to diff withtextwrap.shorten
, maybeshorten_chars
or better ideas?If appropriate, I'm glad to submit a PR.
The text was updated successfully, but these errors were encountered: