code: def pop(self, bytes):
          
          self.io.seek(0)
          head = self.io.read(bytes)
          tail = self.io.read()
          self.io.seek(0)
          self.io.write(tail)
          self.io.truncate()
          return head
docs: Like :class:`head()`, but also removes the head from the buffer.
  
          :type  bytes: int
          :param bytes: The number of bytes to return and remove.