parameters: (old, new, filename)
return_statement: return text
docstring: Return text of unified diff between old and new.
docstring_summary: Return text of unified diff between old and new.
docstring_tokens: Return text of unified diff between old and new .
function: def get_diff_text(old, new, filename):
      """Return text of unified diff between old and new."""
      newline = '\n'
      diff = difflib.unified_diff(
          old, new,
          'original/' + filename,
          'fixed/' + filename,
          lineterm=newline)
  
      text = ''
      for line in diff:
          text += line
  
          # Work around missing newline (http://bugs.python.org/issue2142).
          if text and not line.endswith(newline):
              text += newline + r'\ No newline at end of file' + newline
  
      return text
function_tokens: def get_diff_text ( old , new , filename ) : newline = '\n' diff = difflib . unified_diff ( old , new , 'original/' + filename , 'fixed/' + filename , lineterm = newline ) text = '' for line in diff : text += line # Work around missing newline (http://bugs.python.org/issue2142). if text and not line . endswith ( newline ) : text += newline + r'\ No newline at end of file' + newline return text