When writing doc strings in python, I am wondering if the docstring should contain the exceptions that are implicitly raised or if it should also contain the exceptions I explic
No. The docstring should describe the input expected. If this were my function, I would include something like this in the docstring:
"""Return the inverse of an integer. ZeroDivisionError is raised if zero is
passed to this function."""
Therefore it is specified that the input should be an integer. Specifying that the function can raise a TypeError
just overly complicates the docstring.