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 vajrasky
Recipients barry, ezio.melotti, georg.brandl, pitrou, vajrasky
Date 2013-07-31.06:11:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Monsieur Pitrou, thanks for the explanation. Actually, IMHO I prefer, 'hello (...)' should be the minimum words we can use not '(...)' because '(...)' does not make any sense. But, anyway, it's your call. :)

Anyway, using your summarize2.patch:

>>> textwrap.summarize('hello      world!', width=6)

>>> textwrap.summarize('hello      world!', width=5)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ethan/Documents/code/python/cpython/Lib/", line 378, in summarize
    return w.summarize(text, placeholder=placeholder)
  File "/home/ethan/Documents/code/python/cpython/Lib/", line 314, in summarize
    raise ValueError("placeholder too large for max width")
ValueError: placeholder too large for max width

Why? '(...)' is 5 characters only. I checked the patch and found out that the placeholder is ' (...)' (with space) and you compare the width with the placeholder.
Date User Action Args
2013-07-31 06:11:41vajraskysetrecipients: + vajrasky, barry, georg.brandl, pitrou, ezio.melotti
2013-07-31 06:11:41vajraskysetmessageid: <>
2013-07-31 06:11:41vajraskylinkissue18585 messages
2013-07-31 06:11:40vajraskycreate