parameters: (self, line_index_iterator, transform_callback)
return_statement: return '\n'.join(lines)
docstring: Transforms the text on a range of lines.
          When the iterator yield an index not in the range of lines that the
          document contains, it skips them silently.
  
          To uppercase some lines::
  
              new_text = transform_lines(range(5,10), lambda text: text.upper())
  
          :param line_index_iterator: Iterator of line numbers (int)
          :param transform_callback: callable that takes the original text of a
                                     line, and return the new text for this line.
  
          :returns: The new text.
docstring_summary: Transforms the text on a range of lines.
          When the iterator yield an index not in the range of lines that the
          document contains, it skips them silently.
docstring_tokens: Transforms the text on a range of lines . When the iterator yield an index not in the range of lines that the document contains it skips them silently .
function: def transform_lines(self, line_index_iterator, transform_callback):
          """
          Transforms the text on a range of lines.
          When the iterator yield an index not in the range of lines that the
          document contains, it skips them silently.
  
          To uppercase some lines::
  
              new_text = transform_lines(range(5,10), lambda text: text.upper())
  
          :param line_index_iterator: Iterator of line numbers (int)
          :param transform_callback: callable that takes the original text of a
                                     line, and return the new text for this line.
  
          :returns: The new text.
          """
          # Split lines
          lines = self.text.split('\n')
  
          # Apply transformation
          for index in line_index_iterator:
              try:
                  lines[index] = transform_callback(lines[index])
              except IndexError:
                  pass
  
          return '\n'.join(lines)
function_tokens: def transform_lines ( self , line_index_iterator , transform_callback ) : # Split lines lines = self . text . split ( '\n' ) # Apply transformation for index in line_index_iterator : try : lines [ index ] = transform_callback ( lines [ index ] ) except IndexError : pass return '\n' . join ( lines )