def get_differ(a, b, ignore_space=False, compat_version=DiffCompatVersion.DEFAULT):
 cls = None
 if (compat_version in DiffCompatVersion.MYERS_VERSIONS):
  from reviewboard.diffviewer.myersdiff import MyersDiffer
  cls = MyersDiffer
 elif (compat_version == DiffCompatVersion.SMDIFFER):
  from reviewboard.diffviewer.smdiff import SMDiffer
  cls = SMDiffer
 else:
  raise DiffCompatError((u'Invalid diff compatibility version (%s) passed to Differ' % compat_version))
 return cls(a, b, ignore_space, compat_version=compat_version)

def get_differ ( a , b , ignore_space = False , compat_version = DiffCompatVersion . DEFAULT ) : cls = None if ( compat_version in DiffCompatVersion . MYERS_VERSIONS ) : from reviewboard . diffviewer . myersdiff import MyersDiffer cls = MyersDiffer elif ( compat_version == DiffCompatVersion . SMDIFFER ) : from reviewboard . diffviewer . smdiff import SMDiffer cls = SMDiffer else : raise DiffCompatError ( ( u'Invalid diff compatibility version (%s) passed to Differ' % compat_version ) ) return cls ( a , b , ignore_space , compat_version = compat_version )
returns a differ for with the given settings .