[Numpy-discussion] parameter types for documentation

Ralf Gommers ralf.gommers at googlemail.com
Sat Oct 24 18:19:04 EDT 2009


On Sun, Oct 25, 2009 at 12:14 AM, Christopher Burns <cburns at berkeley.edu>wrote:

> Are the appropriate parameter types for the docstrings, listed
> somewhere?  In particular, in reviewing some docs I see both 'str' and
> 'string' used.  Which one is correct?
>
> Not all of them are listed in one place. For general advice, see the
Parameters section of
http://projects.scipy.org/numpy/wiki/CodingStyleGuidelines
One error on that page is {True, False}, that should be bool.

str is correct, string is not. Reason: str is the type.

Partial list:
str
bool
list
tuple
sequence
ndarray
array_like

or if you can be more precise:
list of str
sequence of ints

and for keywords, add ", optional"

Cheers,
Ralf




> Chris
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20091025/799b4824/attachment.html>


More information about the NumPy-Discussion mailing list