Generate sero-or-one str from those accumulated. Using `yield from accum.pop()` in a generator setting avoids producing an empty string when no text is in the accumulator.
(self)
| 370 | self._texts.append(text) |
| 371 | |
| 372 | def pop(self) -> Iterator[str]: |
| 373 | """Generate sero-or-one str from those accumulated. |
| 374 | |
| 375 | Using `yield from accum.pop()` in a generator setting avoids producing an empty |
| 376 | string when no text is in the accumulator. |
| 377 | """ |
| 378 | if not self._texts: |
| 379 | return |
| 380 | text = self._separator.join(self._texts) |
| 381 | self._texts.clear() |
| 382 | yield text |