Handling errors as return values



examples/exceptions/demo1.py
def some_function()
    result = do_something(filename)
    if result:
        do_something_else(result)
    else:
        return result

main()
    ...
    result = some_function()

examples/exceptions/demo2.py
main()
    ...
    result = do_something(filename)
    ...
    ...
    do_something_else(result)

examples/exceptions/demo3.py
main()
    ...
    do_something(filename)
    ...
    ...
    do_something_else_assuming_the_other_worked()