code: def set_data(self, data):
          
  
          if not isinstance(data, basestring):
              raise ValueError("data must an instance of basestring")
          self._data = data
          self._current = 0
docs: Set a new data buffer.
  
          :Parameters:
  
              `data` : a basestring object 
                  New data buffer.