def has_key(lists: list, key: str, value: any) -> bool:
logger.debug("lists()=%d,key='%s',value[]='%s' - CALLED!", len(lists), key, type(value))
if not isinstance(lists, list):
- raise ValueError(f"Parameter lists[]='{type(lists)}' is not 'list'")
+ raise ValueError(f"Parameter lists[]='{type(lists)}' is not of type 'list'")
elif not isinstance(key, str):
- raise ValueError(f"Parameter key[]='{type(key)}' is not 'str'")
+ raise ValueError(f"Parameter key[]='{type(key)}' is not of type 'str'")
elif key == "":
raise ValueError("Parameter 'key' is empty")
for row in lists:
logger.debug("row[%s]='%s", type(row), row)
if not isinstance(row, dict):
- raise ValueError(f"row[]='{type(row)}' is not 'dict'")
+ raise ValueError(f"row[]='{type(row)}' is not of type 'dict'")
elif not key in row:
raise KeyError(f"Cannot find key='{key}'")
elif row[key] == value: