I have a list of functions that may fail and, if one fails, I don\'t want the script to stop, but to continue with next function.
I am executing it with something like th
I think in some rare cases catching general exception is just justified and there is a way to trick PEP8 inspection:
list_of_functions = [f_a,f_b,f_c]
for current_function in list_of_functions:
try:
current_function()
except (ValueError, Exception):
print(traceback.format_exc())
You can replace ValueError
by any other. It works for me (at least in PyCharm).