def escapedComment(data):
 if isinstance(data, unicode):
  data = data.encode('utf-8')
 return data.replace('--', '- -')

def escapedComment ( data ) : if isinstance ( data , unicode ) : data = data . encode ( 'utf-8' ) return data . replace ( '--' , '- -' )
escape a comment for inclusion in a document .