Skip to content

fix documentation in toplevel functions #52

Description

@krother

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions