Let's say I have a decorator that forces the function to print any exceptions and return None if an exception occurs, instead of failing. Assuming this is a good idea, what is the preferred name style?
a)
@ignore_exceptions def foobar(a, b, c): raise ValueError("This function always fails...")
b)
@ignores_exceptions def foobar(a, b, c): raise ValueError("This function always fails...")
That is: should it a) be a command (the decorator tells the function to do something else) or b) description (the decorator allows the programmer to know the attribute of the function)?
source share