Confusing textwrap parameters, and request for RE help

Richard Damon Richard at Damon-Family.org
Thu Mar 26 15:33:57 EDT 2020


On 3/26/20 3:20 PM, Grant Edwards wrote:
> On 2020-03-26, Peter J. Holzer <hjp-python at hjp.at> wrote:
>>> Actually, fixed width fonts are easy to justify, you just add additional 
>>> space between words through the line.
>> Yes. It's easy to do it wrong and impossible to do it right :-)
>>
>> (BTDT)
>>
>> The problem is that you can only insert an integral number of spaces und
>> the number of spaces you need to insert is rarely a multiple of the
>> number of gaps between words. So you get uneven spacing, which looks
>> horrible.
> That was always an interesting freshman programming homework
> problem. But you're right, nobody in their right mind would actually
> want to generate real output that way.  Ragged-right is far, far
> better than using fixed-width font justified with extra spaces
> scattered in.
>
> --
> Grant
>
>
>
Back in the day it was FREQUENTLY done, in part to show off, anyone
could type with a typewriter and get jagged right margins, but with a
computer you could get justified margins with uneven internal spacing!!
Status!

-- 
Richard Damon



More information about the Python-list mailing list