Factor out the remaining single category tables.

This commit is contained in:
Reece H. Dunn
2012-12-22 12:55:23 +00:00
parent 7f1dd9cc96
commit 2df0e6abdb
2 changed files with 47 additions and 85 deletions
+3 -1
View File
@@ -49,7 +49,7 @@ category_sets = [
# These categories have many pages consisting of just this category:
# Cn -- Unassigned
# Lo -- CJK Ideographs
special_categories = ['Cn', 'Lo']
special_categories = ['Cn', 'Lo', 'Sm', 'So']
category_tables = {}
for codepoints, category, comment in category_sets:
@@ -67,6 +67,8 @@ for codepoints, category, comment in category_sets:
if table_entry:
if table_category in special_categories:
table[table_codepoint] = table_category
elif table_category:
raise Exception('%s only table not in the special_categories list.' % table_category)
else:
table[table_codepoint] = table_entry
table_entry = []