Useful utility decorators.
After the function finishes, resets the value of mpmath.mp.dps to the value it had before the function was run.
doctest_depends_on(exe=None, modules=None, disable_viewers=None)¶
Adds metadata about the dependencies which need to be met for doctesting the docstrings of the decorated objects.
Don’t ‘inherit’ certain attributes from a base class
>>> class A: ... x = 'test'
>>> A.x = no_attrs_in_subclass(A, A.x)
>>> class B(A): ... pass
>>> hasattr(A, 'x') True >>> hasattr(B, 'x') False