For example, for:
def foo(a):
if a == 10:
raise FooError
return 1 / a
Should the docstring for foo contain something like:
"""Raises:
FooError: if a is equal to 10.
ZeroDivisionError: if a is equal to 0.
"""
Or should it just list the exceptions that the function itself raises, i. e. FooError? Any insights as to what's better are welcome, thanks.