bundles / astropy latest / astropy / extern / configobj / validate / force_list
function
astropy.extern.configobj.validate:force_list
source: /astropy/extern/configobj/validate.py :1227
Signature
def force_list ( value , min = None , max = None ) Summary
Check that a value is a list, coercing strings into a list with one member. Useful where users forget the trailing comma that turns a single value into a list.
Extended Summary
You can optionally specify the minimum and maximum number of members. A minumum of greater than one will fail if the user only supplies a string.
>>> vtor.check('force_list', ()) [] >>> vtor.check('force_list', []) [] >>> vtor.check('force_list', 'hello') ['hello']
Aliases
-
astropy.config.configuration.validate.force_list