bundles / astropy 7.0.1 / astropy / extern / configobj / validate / is_bool_list
function
astropy.extern.configobj.validate:is_bool_list
source: /astropy/extern/configobj/validate.py :1132
Signature
def is_bool_list ( value , min = None , max = None ) Summary
Check that the value is a list of booleans.
Extended Summary
You can optionally specify the minimum and maximum number of members.
Each list member is checked that it is a boolean.
>>> vtor.check('bool_list', ()) [] >>> vtor.check('bool_list', []) [] >>> check_res = vtor.check('bool_list', (True, False)) >>> check_res == [True, False] 1 >>> check_res = vtor.check('bool_list', [True, False]) >>> check_res == [True, False] 1 >>> vtor.check('bool_list', [True, 'a']) Traceback (most recent call last): VdtTypeError: the value "a" is of the wrong type.
Aliases
-
astropy.config.configuration.validate.is_bool_list