def append(self,x):
		"""append an element at the end of the buffer"""
		self.data.append(x)
		if len(self.data) == self.max:
			self.cur=0
			self.__class__ = RingBufferFull
append an element at the end of the buffer
recipes/Python/68429_Ring_buffer/recipe-68429.py