sync with O'Reilly Atlas

This commit is contained in:
Luciano Ramalho
2021-07-07 23:45:54 -03:00
parent f0f160844d
commit 23e78eeb82
64 changed files with 2087 additions and 124 deletions

View File

@@ -34,11 +34,11 @@ def main(args):
print(count, 'characters shown')
else:
counts, firsts = category_stats()
for cat, count in counts.most_common():
for i, (cat, count) in enumerate(counts.most_common(), 1):
first = firsts[cat]
if cat == 'Cs':
first = f'(surrogate U+{ord(first):04X})'
print(f'{count:6} {cat} {first}')
print(f'{i:2} {count:6} {cat} {first}')
if __name__ == '__main__':