{ } Raw JSON

bundles / astropy 7.0.1 / astropy / extern / configobj / validate / is_int_list

function

astropy.extern.configobj.validate:is_int_list

source: /astropy/extern/configobj/validate.py :1109

Signature

def   is_int_list ( value min = None max = None )

Summary

Check that the value is a list of integers.

Extended Summary

You can optionally specify the minimum and maximum number of members.

Each list member is checked that it is an integer.

>>> vtor.check('int_list', ())
[]
>>> vtor.check('int_list', [])
[]
>>> vtor.check('int_list', (1, 2))
[1, 2]
>>> vtor.check('int_list', [1, 2])
[1, 2]
>>> vtor.check('int_list', [1, 'a'])
Traceback (most recent call last):
VdtTypeError: the value "a" is of the wrong type.

Aliases

  • astropy.config.configuration.validate.is_int_list