On Sat, Aug 6, 2016 at 3:13 AM, Chris Angelico wrote:
unicodedata.lookup("NULL")
> '\x00'
"\N{NULL}"
> '\x00'
unicodedata.name(_)
> Traceback (most recent call last):
> File "", line 1, in
> ValueError: no such name
>
> Tested on 3.4, 3.5, and 3.6. Extremely odd.
U+ has a le
Not all Unicode codepoints are supported by unicodedata.name(), but
they are supported in \N escapes and unicodedata.lookup. Is there a
reason for this?
Normally, you can do this:
>>> "\N{GREEK SMALL LETTER OMEGA}"
'ω'
>>> unicodedata.name(_)
'GREEK SMALL LETTER OMEGA'
But check this out:
>>> u