NO_RESULT¶
-
privex.helpers.types.
NO_RESULT
¶ Simple functionless type which means “no results were found or nothing matched this function’s query”.
Useful for returning a unique “nothing to return” value from functions where
None
/False
might be considered as successful, and exceptions aren’t suitable:>>> from privex.helpers.types import NO_RESULT >>> def some_func(x: int): ... if (x + 1) > 2: return True ... elif (x + 1) < 2: return False ... if x == 0 or (x + 1) == 0: return None ... return NO_RESULT >>> res = some_func(-2) >>> res == NO_RESULT True
alias of
privex.helpers.types.NoResult