CADETProcess.dataStructure.parameter.Bool

CADETProcess.dataStructure.parameter.Bool#

class CADETProcess.dataStructure.parameter.Bool(*args: Any, ty: type | None = None, **kwargs: Any)[source]#

Bases: Typed

Parameter descriptor constrained to boolean values.

Notes

This class also supports casting integers 0 and 1 to their boolean equivalents.

cast_value(value: Any) bool | Any[source]#

Convert integers 0 and 1 to their respective boolean values.

Parameters:
valueAny

Value to be cast.

Returns:
Union[bool, Any]

Boolean equivalent if value is 0 or 1; otherwise, the original value.

ty#

alias of bool