Package qm :: Package test :: Package classes :: Module sql_result_stream :: Class _Buffer
[hide private]
[frames] | no frames]

Class _Buffer
source code

A little buffering iterator with one-element rewind.

Instance Methods [hide private]
  __init__(self, size, get_more)
Create a '_Buffer'.
  next(self)
Returns the next item, refilling the buffer if necessary.
  rewind(self)
  __iter__(self)

Method Details [hide private]

__init__(self, size, get_more)
(Constructor)

source code 
Create a '_Buffer'.

'size' -- the number of items to hold in the buffer at a time.

'get_more' -- a function taking a number as its sole argument;
              should return a list of that many new items (or as
              many items are left, whichever is less).

next(self)

source code 
Returns the next item, refilling the buffer if necessary.

rewind(self)

source code 

__iter__(self)

source code