strtobool
Convert common terms for true/false to bool.
def strtobool(
term: any,
table: dict = None
) - > boolean
Convert common terms for true/false to bool.
Parameters
| Name | Type | Description |
|---|---|---|
| term | any | The value to be converted, typically a string representation of a boolean such as 'true', 'yes', 'on', or '1' |
| table | dict = None | A mapping of lowercase strings to boolean values used for lookup; defaults to a standard truthy/falsy table if not provided |
Returns
| Type | Description |
|---|---|
boolean | The boolean representation of the input term, or the original term if it is not a string |