Vajrasky Kok added the comment:
Okay, nevermind about non-normalized whitespaces in placeholder, but what about
this case?
>>> text = "Hello there, how are you this fine day? I'm glad to hear it!"
>>> from textwrap import shorten
>>> shorten(text, 10, placeholder=" ")
'Hello'
>>> shorten(text, 9, placeholder=" ")
''
>>> len('Hello')
5
Isn't that weird?
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18723>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com