File tree Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Original file line number Diff line number Diff line change 15
15
(0x02800 , 0x028FF ), # Braille
16
16
]
17
17
18
-
19
- def _make_single_cell_set () -> frozenset [str ]:
20
- """Combine ranges of ordinals in to a frozen set of strings.
21
-
22
- Returns:
23
- A frozenset of single cell characters.
24
-
25
- """
26
- character_range_lists = [
27
- list (map (chr , range (_start , _end + 1 )))
18
+ # A set of characters that are a single cell wide
19
+ _SINGLE_CELLS = frozenset (
20
+ [
21
+ character
28
22
for _start , _end in _SINGLE_CELL_UNICODE_RANGES
23
+ for character in map (chr , range (_start , _end + 1 ))
29
24
]
30
- return frozenset (sum (character_range_lists , start = []))
31
-
32
-
33
- # A set of characters that are a single cell wide
34
- _SINGLE_CELLS = _make_single_cell_set ()
25
+ )
35
26
36
27
# When called with a string this will return True if all
37
28
# characters are single-cell, otherwise False
You can’t perform that action at this time.
0 commit comments