Author r.david.murray
Recipients barry, ezio.melotti, georg.brandl, pitrou, r.david.murray, steven.daprano, vajrasky
Date 2013-08-05.15:14:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375715666.8.0.768627669498.issue18585@psf.upfronthosting.co.za>
In-reply-to
Content
Looking just at the proposed functionality (taking a prefix) and ignoring the requested complexification :), the usual name for the text produced by this process is a "lead" (http://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Lead_section), although formally a lead is actually written to be used as such, as opposed to just taking a prefix, so that word really has the same problem as 'summarize'.

I think 'truncate' would be a better name.  Or, if you don't mind being wordier, extract_prefix.  The fact that it is part of the textwrap module should be enough clue that the truncation happens at whitespace.  Truncate could also apply to the expanded version if you squint a little, if Antoine is interested in that.  On the other hand, the use case presented for that is not going to be served by this function anyway, since this function (being part of textwrap) breaks on whitespace...it shouldn't (IMO) elide text other than at whitespace.  If you want that functionality it belongs in some other module, I think.

The placeholder argument could alternatively be named 'ellipsis', but placeholder is certainly fine.

shorten would probably be better if you are going with the expanded version, but I like truncate.  It is probably significant that that is what the title of the issue calls it :)
History
Date User Action Args
2013-08-05 15:14:26r.david.murraysetrecipients: + r.david.murray, barry, georg.brandl, pitrou, ezio.melotti, steven.daprano, vajrasky
2013-08-05 15:14:26r.david.murraysetmessageid: <1375715666.8.0.768627669498.issue18585@psf.upfronthosting.co.za>
2013-08-05 15:14:26r.david.murraylinkissue18585 messages
2013-08-05 15:14:26r.david.murraycreate