Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
On Wed, Nov 24, 2010 at 3:37 PM, Marc-Andre Lemburg <rep...@bugs.python.org> wrote: .. > I don't think we should change that for the formatting methods. That's a reasonable position. What about >>> unicodedata.category('\N{OLD ITALIC LETTER A}') 'Lo' >>> '\N{OLD ITALIC LETTER A}'.isalpha() False the str.isalpha() method is underspecified in the reference manual, but a comment in unicodectype.c describes Py_UNICODE_ISALPHA as follows: /* Returns 1 for Unicode characters having the category 'Ll', 'Lu', 'Lt', 'Lo' or 'Lm', 0 otherwise. */ I don't have a wide build handy, but I am fairly sure '\N{OLD ITALIC LETTER A}'.isalpha() would produce True there. The result above is simply consequence of surrogates considered to be non-letters: >>> [c.isalpha() for c in '\N{OLD ITALIC LETTER A}'] [False, False] ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10521> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com