Method: rich._wrap.words
Calls: 1464, Exceptions: 0, Paths: 2Back
Path 1: 1258 calls (0.86)
'Step 0' (77) 'Step 1' (70) 'Step 2' (63) 'Step 3' (56) 'Step 4' (49) 'foo' (45) 'Step 5' (42) 'bar' (39) 'Step 6' (35) 'Step 7' (28)
(0, 5, 'Step ') (455) (5, 6, '0') (77) (5, 6, '1') (70) (5, 6, '2') (63) (0, 4, '│ ') (60) (5, 6, '3') (56) (5, 6, '4') (49) (0, 3, 'foo') (45) (5, ...
1def words(text: str) -> Iterable[Tuple[int, int, str]]:
2 position = 0
3 word_match = re_word.match(text, position)
4 while word_match is not None:
5 start, end = word_match.span()
6 word = word_match.group(0)
7 yield start, end, word
8 word_match = re_word.match(text, end)
Path 2: 206 calls (0.14)
'' (195) ' ' (4) ' ' (4) ' ' (2) ' ' (1)
1def words(text: str) -> Iterable[Tuple[int, int, str]]:
2 position = 0
3 word_match = re_word.match(text, position)
4 while word_match is not None:
5 start, end = word_match.span()
6 word = word_match.group(0)
7 yield start, end, word
8 word_match = re_word.match(text, end)