unicodedata.name

Szabolcs Nagy nszabolcs at gmail.com
Wed Feb 1 11:43:21 EST 2006


the unicodedata manual sais:
"
name(  	unichr[, default])
    Returns the name assigned to the Unicode character unichr as a
string. If no name is defined, default is returned, or, if not given,
ValueError is raised.
"
what is the difference between "no name defined" and "not given"?
eg. '\n' why gives a ValueError?

>>> unicodedata.name(u'\n')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ValueError: no such name




More information about the Python-list mailing list