#NEWLINE# def report_diff_keyword_attr( fileobj , attr , diffs , keyword , ind = 0 ) : #NEWLINE# #INDENT# '\n    Write a diff between two header keyword values or comments to the specified\n    file-like object.\n    ' #NEWLINE# if ( keyword in diffs ) : #NEWLINE# #INDENT# vals = diffs [ keyword ] #NEWLINE# for ( idx , val ) in enumerate ( vals ) : #NEWLINE# #INDENT# if ( val is None ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( idx == 0 ) : #NEWLINE# #INDENT# dup = '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# dup = ( '[%d]' % ( idx + 1 ) ) #NEWLINE# #UNINDENT# fileobj . write ( indent ( ( ' Keyword %-8s%s has different %s:\n' % ( keyword , dup , dup ) ) , ind ) ) #NEWLINE# report_diff_values ( fileobj , val [ 0 ] , val [ 1 ] , ind = ( ind + 1 ) )