def _sameFrag(f, g):
 if (hasattr(f, 'cbDefn') or hasattr(g, 'cbDefn') or hasattr(f, 'lineBreak') or hasattr(g, 'lineBreak')):
  return 0
 for a in ('fontName', 'fontSize', 'textColor', 'backColor', 'rise', 'underline', 'strike', 'link'):
  if (getattr(f, a, None) != getattr(g, a, None)):
   return 0
 return 1

def _sameFrag ( f , g ) : if ( hasattr ( f , 'cbDefn' ) or hasattr ( g , 'cbDefn' ) or hasattr ( f , 'lineBreak' ) or hasattr ( g , 'lineBreak' ) ) : return 0 for a in ( 'fontName' , 'fontSize' , 'textColor' , 'backColor' , 'rise' , 'underline' , 'strike' , 'link' ) : if ( getattr ( f , a , None ) != getattr ( g , a , None ) ) : return 0 return 1
returns 1 if two parafrags map out the same .