16 Aug 16:36
Guidelines for documenting parameter types
From: Neil Crighton <neilcrighton <at> gmail.com>
Subject: Guidelines for documenting parameter types
Newsgroups: gmane.comp.python.scientific.devel
Date: 2008-08-16 14:38:54 GMT
Subject: Guidelines for documenting parameter types
Newsgroups: gmane.comp.python.scientific.devel
Date: 2008-08-16 14:38:54 GMT
A few of us participating in the doc marathon (http://sd-2116.dedibox.fr/pydocweb/wiki/Front%20Page/) have some questions about documenting parameter types, and I thought it would be good to get others' opinions. If we can agree on some guidelines, perhaps they could be incorporated into the docstring standard (http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines#docstring-standard)? I don't mind what we end up deciding on, but I think it's a good idea to address these situations in the guidelines so new people know what to do, and can feel comfortable about cleaning up someone else's docstring to match the guidelines (if necessary). Maybe some of these are pedantic, but I think they'll help to give the docs a more unified feel and make sure it's always clear what parameter types are meant. (1) When we mention types in the parameters, we are mostly using the following abbreviations: integer : int float : float boolean : bool complex : complex list : list tuple : tuple i.e. the same as the python function names for each type. It would be nice to say in the guidelines that these should be followed where possible. (2) Often it's useful to state the type of an input or returned array. If we want to say the array returned by np.all is of type bool, what(Continue reading)
RSS Feed