[issue12914] Add cram function to textwrap

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: > if the API were to be expanded, perhaps it should be as a part of a > focuse[d], thoughtful effort to provide a more generic set of text > formatting transformations perhaps modeled on deep experiences with > similar modules in other languages. (as opposed to pie

[issue12914] Add cram function to textwrap

2011-09-11 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12914] Add cram function to textwrap

2011-09-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: This pretty well summarizes my vague feelings. I originally used a size 30 in my example, getting 'This sentence...made available' and then realized that it was a complete accident that I got complete words. If anything were made publicly available, I might l

[issue12914] Add cram function to textwrap

2011-09-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: A few thoughts: * no one has ever made a request for this * different people may want to do it in different ways (the formulas are hard-wired). * the '...' connector is hardwired (perhaps ' ... ' would look less odd). * we should have a preference for ke

[issue12914] Add cram function to textwrap

2011-09-09 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue12914] Add cram function to textwrap

2011-09-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: It is already available: >>> import pydoc >>> pydoc.cram('This sentence is too long to fit the space I have made >>> available', 28) 'This sentenc...ade available' def cram(text, maxlen): """Omit part of a string if needed to make it fit in a maximum lengt

[issue12914] Add cram function to textwrap

2011-09-06 Thread Éric Araujo
New submission from Éric Araujo : The pydoc module has a cram function that could be useful to Python authors, if we made it public (textwrap sounds like a great place). -- components: Library (Lib) messages: 143625 nosy: eric.araujo priority: normal severity: normal status: open title: