string module

Tim Peters tim.one at comcast.net
Mon May 20 02:16:11 EDT 2002


[Fernando Pérez]
> ...
> So how in the world do I get the extra accented chars shoved
> into string.uppercase? The relevant section in
> /usr/lib/python2.2/string.py:
>
> # Some strings for ctype-style character classification
> whitespace = ' \t\n\r\v\f'
> lowercase = 'abcdefghijklmnopqrstuvwxyz'
> uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
> letters = lowercase + uppercase

A more relevant section in string.py is at its end:

try:
    from strop import maketrans, lowercase, uppercase, whitespace
    letters = lowercase + uppercase
except ImportError:
    pass







More information about the Python-list mailing list