# `CircBuf`

digraph inheritance6ba4a62218 { bgcolor=transparent; rankdir=UD; ratio=compress; size="8.0, 12.0"; "CircBuf" [URL="#taurus.core.util.containers.CircBuf",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="A circular buffer of Python values."]; }

class CircBuf(leng)

  A circular buffer of Python values.

  Examples:

      >>> cb = CircBuf(3)
      >>> cb.is_empty()
      1
      >>> cb.put('first')
      >>> cb.is_empty()
      0
      >>> cb.put('second')
      >>> cb.put('third')
      >>> cb.is_full()
      1
      >>> cb.put('fourth')
      >>> cb.get()
      'second'
      >>> cb.get()
      'third'
      >>> cb.get()
      'fourth'
      >>> cb.is_empty()
      1

  Import from `taurus.core.util.containers` as:

      from taurus.core.util.containers import CircBuf

  get()

    Retrieves an item from a non-empty circular buffer.

  is_empty()

    Returns true only if CircBuf has no items.

  is_full()

    Returns true only if CircBuf has no space.

  put(item)

    Puts an item onto a circular buffer.