dicfg.configs.configtuple.ConfigTuple#
- class ConfigTuple(data, updater=None, validator=None)[source]#
Bases:
ConfigValue
,tuple
- __init__(data: Any, updater: tuple[UpdaterAddon] | None = None, validator: tuple[ValidatorAddon] | None = None)#
Methods
__init__
(data[, updater, validator])cast
()Cast wrapped value to builtin python value
count
(value, /)Return number of occurrences of value.
factory
(data[, updater, validator, modifier])index
(value[, start, stop])Return first index of value.
modify
(b)Merges config b with it self
validate
()Validate the config
- count(value, /)#
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)#
Return first index of value.
Raises ValueError if the value is not present.
- modify(b: ConfigValue) ConfigValue #
Merges config b with it self
- Parameters:
b (ConfigValue) – another config
- Returns:
self
- Return type: