On Fri, May 17, 2013 at 11:06 PM, Dave Angel <da...@davea.name> wrote:
> One tool that can help is the name function in module unicodedata
>
>  >>> import unicodedata
>  >>> unicodedata.name(u'\xb0')
> 'DEGREE SIGN'
>
> If you try that on the values near sys.maxunicode you get an exception:
> ValueError: no such name

There's no name since the code point isn't assigned, but the category
is defined:

    >>> unicodedata.category(u'\U0010FFFD')
    'Co'
    >>> unicodedata.category(u'\U0010FFFE')
    'Cn'
    >>> unicodedata.category(u'\U0010FFFF')
    'Cn'

'Co' is the private use category, and 'Cn' is for codes that aren't assigned.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to