So etwas in der Art:
Code: Select all
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")
Code: Select all
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")