Marc-Andre Lemburg <m...@egenix.com> added the comment: I think it would be better to use this code:
if (!Py_UNICODE_ISUPPER(*s)) { *s = Py_UNICODE_TOUPPER(*s); status = 1; } s++; while (--len > 0) { if (Py_UNICODE_ISLOWER(*s)) { *s = Py_UNICODE_TOLOWER(*s); status = 1; } s++; } Since this actually implements what the doc-string says. Note that title case is not the same as upper case. Title case is a special case that get's applied when using a string as a title of a text and may well include characters that are lower case but which are only used in titles. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12266> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com