You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/pyOpenRPA/ValueVerify.py

22 lines
756 B

#valueVerify
#inTypeClass int, str, dict, list, NoneType
def valueVerify(inValue,inTypeClass,inNotValidValue):
lResult = inNotValidValue
if inValue is not None:
if type(inValue) == inTypeClass:
lResult = inValue
#Вернуть результат
return lResult
#valueVerifyDict
def valueVerifyDict(inDict,inKey,inTypeClass,inNotValidValue):
lResult = inNotValidValue
if inKey in inDict:
lResult = valueVerify(inDict[inKey],inTypeClass,inNotValidValue)
return lResult
#valueVerifyList
def valueVerifyList(inList,inIndex,inTypeClass,inNotValidValue):
lResult = inNotValidValue
if inIndex in inList:
lResult = valueVerify(inList[inIndex],inTypeClass,inNotValidValue)
return lResult