def TInstanceOf(cls):
  name = "%s.%s" % (cls.__module__, cls.__name__)

  desc = WithDesc("Instance of %s" % (Parens(name), ))

  return desc(lambda val: isinstance(val, cls))
Checks if a given value is an instance of C{cls}.
dataset/ETHPy150Open ganeti/ganeti/lib/ht.py/TInstanceOf