Lines Matching refs:bufsize
874 def __init__(self, bufsize=10):
875 self.bufsize = bufsize
876 self.buffer = [[None]] * bufsize
879 def reset(self, bufsize=None):
880 if bufsize is None:
881 for i in range(self.bufsize):
884 self.bufsize = bufsize
885 self.buffer = [[None]] * bufsize
888 if self.bufsize > 0:
890 self.ptr = (self.ptr + 1) % self.bufsize
895 if self.bufsize > 0:
901 self.ptr = (self.ptr - 1) % self.bufsize
904 return self.bufsize - self.buffer.count([None])
2930 buf.ptr = (buf.ptr - 1) % buf.bufsize
2931 buf.buffer.insert((buf.ptr+1)%buf.bufsize, [None])