Table of Contents

Class: _Buffer qm/test/classes/sql_result_stream.py

A little buffering iterator with one-element rewind.

Methods   
__init__
__iter__
next
rewind
  __init__ 
__init__ (
        self,
        size,
        get_more,
        )

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).
  __iter__ 
__iter__ ( self )

  next 
next ( self )

Returns the next item, refilling the buffer if necessary.

Exceptions   
StopIteration
  rewind 
rewind ( self )


Table of Contents

This document was automatically generated on Mon Jan 3 09:42:29 2005 by HappyDoc version 2.1