Is there a type hint in the typing
module indicating that something can be of any type but None
/NoneType
?
Like in this hypothetical example:
def foo(bar: AnythingBut[None]): # does this exist?
if bar is None:
raise Exception("bad!")