def _verify(iface, candidate, tentative=0, vtype=None):
 if (vtype == 'c'):
  tester = iface.implementedBy
 else:
  tester = iface.providedBy
 if ((not tentative) and (not tester(candidate))):
  raise DoesNotImplement(iface)
 for (name, desc) in iface.namesAndDescriptions(1):
  try:
   attr = getattr(candidate, name)
  except AttributeError:
   if ((not isinstance(desc, Method)) and (vtype == 'c')):
    continue
   raise BrokenImplementation(iface, name)
  if (not isinstance(desc, Method)):
   continue
  if isinstance(attr, FunctionType):
   if ((sys.version[0] == '3') and isinstance(candidate, type)):
    meth = fromFunction(attr, iface, name=name, imlevel=1)
   else:
    meth = fromFunction(attr, iface, name=name)
  elif (isinstance(attr, MethodTypes) and (type(attr.im_func) is FunctionType)):
   meth = fromMethod(attr, iface, name)
  else:
   if (not callable(attr)):
    raise BrokenMethodImplementation(name, 'Not a method')
   continue
  desc = desc.getSignatureInfo()
  meth = meth.getSignatureInfo()
  mess = _incompat(desc, meth)
  if mess:
   raise BrokenMethodImplementation(name, mess)
 return True

def _verify ( iface , candidate , tentative = 0 , vtype = None ) : if ( vtype == 'c' ) : tester = iface . implementedBy else : tester = iface . providedBy if ( ( not tentative ) and ( not tester ( candidate ) ) ) : raise DoesNotImplement ( iface ) for ( name , desc ) in iface . namesAndDescriptions ( 1 ) : try : attr = getattr ( candidate , name ) except AttributeError : if ( ( not isinstance ( desc , Method ) ) and ( vtype == 'c' ) ) : continue raise BrokenImplementation ( iface , name ) if ( not isinstance ( desc , Method ) ) : continue if isinstance ( attr , FunctionType ) : if ( ( sys . version [ 0 ] == '3' ) and isinstance ( candidate , type ) ) : meth = fromFunction ( attr , iface , name = name , imlevel = 1 ) else : meth = fromFunction ( attr , iface , name = name ) elif ( isinstance ( attr , MethodTypes ) and ( type ( attr . im_func ) is FunctionType ) ) : meth = fromMethod ( attr , iface , name ) else : if ( not callable ( attr ) ) : raise BrokenMethodImplementation ( name , 'Not a method' ) continue desc = desc . getSignatureInfo ( ) meth = meth . getSignatureInfo ( ) mess = _incompat ( desc , meth ) if mess : raise BrokenMethodImplementation ( name , mess ) return True
returns true if number is a verified number according to the leniency .