class documentation

class ConfigDefinitionByClass(ConfigDefinition): (source)

View In Hierarchy

Definition that enforces the value has to have a certain class

Classes that have a new_from_zim_config() method can convert values to the desired class.

Method __eq__ Undocumented
Method __init__ Undocumented
Method check No summary
Method tostring Undocumented
Class Variable __slots__ Undocumented
Instance Variable klass Undocumented

Inherited from ConfigDefinition:

Method __ne__ Undocumented
Instance Variable allow_empty Undocumented
Instance Variable default Undocumented
Method _check_allow_empty Undocumented
Method _eval_string Undocumented
def __eq__(self, other): (source)
def __init__(self, default, klass=None, allow_empty=False): (source)
def check(self, value): (source)
Check value to be a valid value for this key
Returns
(converted) value if valid
Raises
ValueErrorif value is invalid and can not be converted
def tostring(self, value): (source)
__slots__: tuple[str, ...] = (source)
klass = (source)

Undocumented