def verify_correct(cinfo, restrictions): for fname, arg in restrictions.items(): func = restrict.factory(fname) res = func(arg, cinfo) if res: raise RestrictionError(res)