Can upper() or lower() ever change the length of a string?
Mark Dickinson
dickinsm at gmail.com
Mon May 24 08:20:18 EDT 2010
On May 24, 1:13 pm, Steven D'Aprano <st... at REMOVE-THIS-
cybersource.com.au> wrote:
> Do unicode.lower() or unicode.upper() ever change the length of the
> string?
>From looking at the source, in particular the fixupper and fixlower
functions in Objects/unicode.c [1], it looks like not: they do a
simple character-by-character replacement.
[1] http://svn.python.org/view/python/trunk/Objects/unicodeobject.c?view=markup
--
Mark
More information about the Python-list
mailing list