I think the docstrings are messed up in a way Sphinx can't follow. Try:
One problem (easily solved) is that wrapping price_with_tax with currency changes its .name and .doc to that of currency, which is certainly not what we want. The functools modules contains a useful tool, wraps, which will restore these values to what we would expect them to be. It is used like so:
from functools import wraps
def currency(f):
@wraps(f)
def wrapper(_args, *_kwargs):
return '$' + str(f(_args, *_kwargs))
I think the docstrings are messed up in a way Sphinx can't follow. Try:
One problem (easily solved) is that wrapping price_with_tax with currency changes its .name and .doc to that of currency, which is certainly not what we want. The functools modules contains a useful tool, wraps, which will restore these values to what we would expect them to be. It is used like so:
from functools import wraps
def currency(f):
@wraps(f)
def wrapper(_args, *_kwargs):
return '$' + str(f(_args, *_kwargs))