equal
deleted
inserted
replaced
2795 |
2795 |
2796 self.iter = splitbig(in_iter) |
2796 self.iter = splitbig(in_iter) |
2797 self._queue = collections.deque() |
2797 self._queue = collections.deque() |
2798 self._chunkoffset = 0 |
2798 self._chunkoffset = 0 |
2799 |
2799 |
|
2800 def __iter__(self): |
|
2801 while self._queue: |
|
2802 chunk = self._queue.popleft() |
|
2803 if self._chunkoffset: |
|
2804 yield chunk[self._chunkoffset :] |
|
2805 else: |
|
2806 yield chunk |
|
2807 self._chunkoffset = 0 |
|
2808 yield from self.iter |
|
2809 |
2800 def read(self, l=None): |
2810 def read(self, l=None): |
2801 """Read L bytes of data from the iterator of chunks of data. |
2811 """Read L bytes of data from the iterator of chunks of data. |
2802 Returns less than L bytes if the iterator runs dry. |
2812 Returns less than L bytes if the iterator runs dry. |
2803 |
2813 |
2804 If size parameter is omitted, read everything""" |
2814 If size parameter is omitted, read everything""" |