Package recsql :: Module sqlarray :: Class Ringbuffer
[hide private]
[frames] | no frames]

Class Ringbuffer

source code

object --+    
         |    
      list --+
             |
            Ringbuffer

Ringbuffer that can be treated as a list.

Note that the real queuing order is only obtained with the :meth:`tolist` method.

Based on http://www.onlamp.com/pub/a/python/excerpt/pythonckbk_chap1/index1.html

Nested Classes [hide private]
  __Full
Instance Methods [hide private]
new list
__init__(self, capacity, iterable=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
append(self, x)
append object to end
source code
 
extend(self, iterable)
extend list by appending elements from the iterable
source code
 
tolist(self)
Return a list of elements from the oldest to the newest.
source code
 
__repr__(self)
repr(x)
source code

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __hash__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __reversed__, __rmul__, __setitem__, __setslice__, count, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, capacity, iterable=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Returns: new list
Overrides: object.__init__
(inherited documentation)

append(self, x)

source code 

append object to end

Overrides: list.append
(inherited documentation)

extend(self, iterable)

source code 

extend list by appending elements from the iterable

Overrides: list.extend
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)