Is it possible to conditionally handle exceptions? I would like to be able to write a function so that the caller can decide who handles the exception. Something like this: def my_func(my_arg, handle_exceptions): try: do_something(my_arg) except Exception as e if handle_exceptions: print("my_func is handling the exception") Continue reading...