is_true¶
-
privex.helpers.common.
is_true
(v) → bool[source]¶ Check if a given bool/str/int value is some form of
True
:bool:
True
str:
'true'
,'yes'
,'y'
,'1'
int:
1
(note: strings are automatically .lower()’d)
Usage:
>>> is_true('true') True >>> is_true('no') False
- Parameters
v (Any) – The value to check for truthfulness
- Return bool is_true
True
if the value appears to be truthy, otherwiseFalse
.