[Python-Dev] textwrap.py

Barry A. Warsaw barry@zope.com
Thu, 6 Jun 2002 22:21:29 -0400


>>>>> "GvR" == Guido van Rossum <guido@python.org> writes:

    GvR> The Emacs folks, who love Knuth, translated this idea for
    GvR> fixed-width text into two spaces.

I always thought the Emacs folks adopted it because it made the
filling algorithms easier to deal with the difference between:

    ...on a stick with no mustard.  At least, that's how I prefer my...

and

    ...in love with Dr. Frankenstein, and who once noticed a watermelon...

Two spaces after the sentence end and one after the abbreviation.
Here's some interesting information from XEmacs:

C-h f fill-paragraph RET

    If `sentence-end-double-space' is non-nil, then period followed by one
    space does not end a sentence, so don't break a line there.

C-h v sentence-end-double-space RET

    *Non-nil means a single space does not end a sentence.  This
    variable applies only to filling, not motion commands.  To change
    the behavior of motion commands, see `sentence-end'.

It's clear to me that any standard wrapping code in Python needs to
handle either style.

-Barry