DangerousValue
- class ase2sprkkr.common.options.DangerousValue(value, value_type=None, validate=True)[source]
This class is used to store (encapsulate) a value, which should not be validated - to overcame sometimes too strict enforment of the options values.
Class hierarchy
Constructor
- Parameters
value_type (GrammarType | None) –
validate (bool) –
- __init__(value, value_type=None, validate=True)[source]
- Parameters
value – A value to be stored
value_type (GrammarType | None) – A grammar type, that the value should satisfy (commonly a mixed type). Can be None - when the only requirement to the value is that it can be stringified.
validate (bool) – Should be the value validated or not (e.g. the value parsed by grammar has been already validated, so there is no need to do it again)