Message194187
A function like this often gets called to truncate lots of lines. Unfortunately for many use-cases, the part truncated is the most significant part of the line. E.g.:
Scanning file:
/home/fred/documents/datafil...
/home/fred/documents/datafil...
/home/fred/documents/datafil...
/home/fred/documents/datafil...
It's often better in cases like this to truncate in the middle:
Scanning file:
/home/fred/doc...datafile01.txt
/home/fred/doc...datafile02.txt
/home/fred/doc...datafile03.txt
/home/fred/doc...datafile04.txt
(I believe Mac OS-X routinely truncates long lines in the middle in this way.)
Perhaps there could be an argument controlling where to truncate (left, right or centre). A good use-case for the new Enums, perhaps? :-) |
|
Date |
User |
Action |
Args |
2013-08-02 17:12:04 | steven.daprano | set | recipients:
+ steven.daprano, barry, georg.brandl, pitrou, ezio.melotti, vajrasky |
2013-08-02 17:12:04 | steven.daprano | set | messageid: <1375463524.89.0.156546355607.issue18585@psf.upfronthosting.co.za> |
2013-08-02 17:12:04 | steven.daprano | link | issue18585 messages |
2013-08-02 17:12:04 | steven.daprano | create | |
|