A Producer that will iterate over boundaries.
| 563 | |
| 564 | |
| 565 | class InterBoundaryIter: |
| 566 | """ |
| 567 | A Producer that will iterate over boundaries. |
| 568 | """ |
| 569 | |
| 570 | def __init__(self, stream, boundary): |
| 571 | self._stream = stream |
| 572 | self._boundary = boundary |
| 573 | |
| 574 | def __iter__(self): |
| 575 | return self |
| 576 | |
| 577 | def __next__(self): |
| 578 | try: |
| 579 | return LazyStream(BoundaryIter(self._stream, self._boundary)) |
| 580 | except InputStreamExhausted: |
| 581 | raise StopIteration() |
| 582 | |
| 583 | |
| 584 | class BoundaryIter: |