Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix documentation in toplevel functions #52

Open
krother opened this issue Sep 7, 2014 · 0 comments
Open

fix documentation in toplevel functions #52

krother opened this issue Sep 7, 2014 · 0 comments

Comments

@krother
Copy link
Collaborator

krother commented Sep 7, 2014

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant