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

more descriptive args in docstrings #18

Open
averagehat opened this issue Dec 21, 2015 · 0 comments
Open

more descriptive args in docstrings #18

averagehat opened this issue Dec 21, 2015 · 0 comments

Comments

@averagehat
Copy link
Contributor

Just a note that a contracts-compatible alternative to the :type tag is the :param tag which can incude a doc of the arg as well.

@contract
def write_summary(data, outfile, delim='\t'): # data is 2d list
    ''' write data as a csv/tsv file to outfile.
    :type data:    Iterable
  etc."""

could be written as:

@contract
def write_summary(data, outfile, delim='\t'): # data is 2d list
    ''' write data as a csv/tsv file to outfile.
    :param   Iterable data: some docs
    :param str,!exists outfile: more docs ..
    etc '''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant