bundles / astropy 7.0.1 / astropy / extern / configobj / validate / is_string_list
function
astropy.extern.configobj.validate:is_string_list
source: /astropy/extern/configobj/validate.py:1180
Signature
def is_string_list(value, min = None, max = None)Summary
Check that the value is a list of strings.
Extended Summary
You can optionally specify the minimum and maximum number of members.
Each list member is checked that it is a string.
>>> vtor.check('string_list', ()) [] >>> vtor.check('string_list', []) [] >>> vtor.check('string_list', ('a', 'b')) ['a', 'b'] >>> vtor.check('string_list', ['a', 1]) Traceback (most recent call last): VdtTypeError: the value "1" is of the wrong type. >>> vtor.check('string_list', 'hello') Traceback (most recent call last): VdtTypeError: the value "hello" is of the wrong type.
Aliases
astropy.config.configuration.validate.is_string_list