Bool
(function from pyomo.common.config
)
- pyomo.common.config.Bool(val)[source]
Domain validator for bool-like objects.
This is a more strict domain than
bool
, as it will error on values that do not “look” like a Boolean value (i.e., it acceptsTrue
,False
, 0, 1, and the case insensitive strings'true'
,'false'
,'yes'
,'no'
,'t'
,'f'
,'y'
, and'n'
)