[Python-Dev] Re: Where to put wrap_text()?

Greg Ward gward@python.net
Mon, 3 Jun 2002 19:46:12 -0400


On 01 June 2002, Tim Peters said:
> I take it you don't spend much time surveying the range of computer science
> literature <wink>.

*snort*  I went to grad school in CS.  Wasn't that enough?  ;->

> Search for
> 
>     Knuth hyphenation
> 
> instead.  Three months later, the best advice you'll have read is to avoid
> hyphenation entirely.

I have no desire to put auto-hyphenation into the Python standard
library -- isn't the whole world trying to get *away* from (natural)
language-specific code?  It's wonderful that Knuth came up with the
algorithm, and even more wonderful that Andrew implemented it for us in
Python.  My wrapping algorithm respects hyphens according to the
English-language conventions I learned in school, augmented by my
peculiar need to handle strings like "-b" and "--file".  But that's all
I need.

> Doing
> justification with fixed-width fonts is like juggling dirt anyway <wink>.

Don't worry, I have even less intention of going there.

        Greg
-- 
Greg Ward - Linux nerd                                  gward@python.net
http://starship.python.net/~gward/
Never put off till tomorrow what you can put off till the day after tomorrow.