[Python-Dev] textwrap.py

Aahz aahz@pythoncraft.com
Thu, 6 Jun 2002 12:15:42 -0400


On Thu, Jun 06, 2002, Greg Ward wrote:
>
>   * The code is not locale-aware; it should be to detect sentence
>     endings, which it needs to do to ensure that there are two spaces
>     after each sentence ending.  Eg. it fixes
>        "I have eaten. And you?"
>     but not
>        "Moi, j'ai mangé. Et toi?"

It should fix neither.  However, it should preserve sentence endings:

    "I have
    eaten.  And you?"

becomes

    "I have eaten.  And you?"

Writing the algorithm this way should require no locale-dependent code.
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"I had lots of reasonable theories about children myself, until I
had some."  --Michael Rios