[Numpy-discussion] parameter types for documentation

Ralf Gommers ralf.gommers@googlemail....
Sat Oct 24 17:19:04 CDT 2009


On Sun, Oct 25, 2009 at 12:14 AM, Christopher Burns <cburns@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@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091025/799b4824/attachment.html 


More information about the NumPy-Discussion mailing list