Specialized implementation of itertools.chain.from_iterable. Each item in *iterable* should be a list. This function is careful not to keep references to yielded objects.
(iterable)
| 609 | |
| 610 | |
| 611 | def _chain_from_iterable_of_lists(iterable): |
| 612 | """ |
| 613 | Specialized implementation of itertools.chain.from_iterable. |
| 614 | Each item in *iterable* should be a list. This function is |
| 615 | careful not to keep references to yielded objects. |
| 616 | """ |
| 617 | for element in iterable: |
| 618 | element.reverse() |
| 619 | while element: |
| 620 | yield element.pop() |
| 621 | |
| 622 | |
| 623 | class BrokenProcessPool(_base.BrokenExecutor): |