lenarother / moderna

A program for comparative RNA modeling.
GNU General Public License v3.0
10 stars 3 forks source link

fix documentation in toplevel functions #52

Open krother opened 10 years ago

krother commented 10 years ago

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))

return wrapper