I'm looking to find a good convention on returning fail from a function if the function fails. I typically like to return None or False but in my case, the function's purpose is to read an IO, which could be bool (True/False), int or float.
So in this case I can't return a False. I've tried to use None but I don't know if this is the best case cause if I don't check the return as I call the function the None output might be recognized as a False output.
I was thinking having a definition files that has string tokens, but that seems in efficient to have to parse the string.
Are there built-in objects available? Whats the convention?