[Python-3000] string module trimming

Jim Jewett jimjjewett at gmail.com
Wed Apr 18 21:24:54 CEST 2007


On 4/17/07, Guido van Rossum <guido at python.org> wrote:
> On 4/17/07, Jim Jewett <jimjjewett at gmail.com> wrote:
> > There are also reasons to want only "local" letters.  For example, in
> > a French interface, I might want to include the extra French letters,
> > but not the Greek.

> The Unicode world doesn't support this directly AFAIK.

Alphabets do tend to be contiguous, but ... not directly, no.

> The locale module doesn't deal with Unicode, only with 8-bit characters (not
> multi-byte characters). You'll lose this anyway. Certainly
> string.letters is not going to provide this functionality.

But for languages in Latin1, 8-bit characters are sufficient --
anything with more than 8 bits is by definition not a (local) letter.

I won't swear that localizations currently replace string.letters with
the appropriately ordered (slight) superset, but it is a valid use
case, and string* (or text*) is clearly the right place.

-jJ


More information about the Python-3000 mailing list