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 serhiy.storchaka
Recipients ezio.melotti, michael.foord, pitrou, serhiy.storchaka
Date 2013-09-16.19:17:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1379359038.43.0.812307696465.issue18996@psf.upfronthosting.co.za>
In-reply-to
Content
Indeed, I'll rename _common_shorten() to _common_shorten_repr() and call safe_repr() inside. As for two vs multiple args, first I wrote a variant with two args (you can see it in my first unlinked patch), but then I seen that general variant is not harder and even shorter.

I'm open for bikeshedding. Perhaps we should change the placeholder to something better (e.g. to "[... skipped ...]")? Is the number of skipped characters is useful? Note that it is a number of skipped characters in the repr, not in the original strings and can be misguided for strings. Perhaps we should change minimal lengths of head, tail, and interior part? Why part is most important and should be larger? Perhaps add a keyword-only parameter maxlen (or other parameters for customization)?
History
Date User Action Args
2013-09-16 19:17:18serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, ezio.melotti, michael.foord
2013-09-16 19:17:18serhiy.storchakasetmessageid: <1379359038.43.0.812307696465.issue18996@psf.upfronthosting.co.za>
2013-09-16 19:17:18serhiy.storchakalinkissue18996 messages
2013-09-16 19:17:17serhiy.storchakacreate