updated contents from Atlas repo

This commit is contained in:
Luciano Ramalho
2014-10-14 14:26:55 -03:00
parent 40688c038d
commit 981d5bc473
157 changed files with 71134 additions and 1 deletions

15
strings-bytes/numerics.py Normal file
View File

@@ -0,0 +1,15 @@
import sys
from unicodedata import name
for i in range(sys.maxunicode):
char = chr(i)
try:
char_name = name(char)
except ValueError: # no such name
continue
flags = []
flags.append('D' if char.isdigit() else '')
flags.append('N' if char.isnumeric() else '')
if any(flags):
flags = '\t'.join(flags)
print('U+%04x' % i, char, flags, char_name, sep='\t')