Some sundry fixes and improvements to the modules.

This commit is contained in:
Sean B. Palmer
2008-03-01 21:07:23 +00:00
parent 3d920f4317
commit 1078791cb6
17 changed files with 9 additions and 5 deletions

5
modules/codepoints.py Normal file → Executable file
View File

@@ -12,7 +12,10 @@ from itertools import islice
def about(u, cp=None, name=None):
if cp is None: cp = ord(u)
if name is None: name = unicodedata.name(u)
if name is None:
try: name = unicodedata.name(u)
except ValueError:
return 'U+%04X (No name found)' % cp
if not unicodedata.combining(u):
template = 'U+%04X %s (%s)'