class Foo:
def bar(self, n):
"""A dummy description.
:param int n: a dummy variable.
:returns: - a result.
:rtype: int
"""
try:
return 1 / n
except ZeroDivisionError as e:
raise e
class Foo:
def bar(self, n):
"""A dummy description.
:param int n: a dummy variable.
:raises ZeroDivisionError: when a value is zero.
:returns: - a result.
:rtype: int
"""
try:
return 1 / n
except ZeroDivisionError as e:
raise e
Please document exceptions for all raised exception types.