Re: [Numpy-discussion] Docstring standard: how to specify variable types

2008-01-24 Thread Stefan van der Walt
Hi Charles On Wed, Jan 23, 2008 at 09:34:44AM -0700, Charles R Harris wrote: 2. How do we specify default values? I like to put them first in the list: {-1, integer} When exactly is this list used? That should be made clear in the standard as well. 3. Why do we need the optional

Re: [Numpy-discussion] Docstring standard: how to specify variable types

2008-01-24 Thread Matthew Brett
Hi, When would the function signature be missing? In C functions we copy the signature into the docstring. I am concerned about duplicating information that may change. I guess that would be def my_func(*args, **kwargs): although, if you're going to document the parameters in detail for

Re: [Numpy-discussion] Docstring standard: how to specify variable types

2008-01-24 Thread Matthew Brett
Also, Perhaps we could have that discussion on the IRC channel on Friday at some specified time? I suppose it's possible to hack up some processor of the form: doc_me('my_file.py') that can introspect things like argument lists, add boilerplate and process the resulting text according to the

Re: [Numpy-discussion] Docstring standard: how to specify variable types

2008-01-24 Thread Robert Kern
Stefan van der Walt wrote: Hi Charles On Wed, Jan 23, 2008 at 09:34:44AM -0700, Charles R Harris wrote: 2. How do we specify default values? I like to put them first in the list: {-1, integer} When exactly is this list used? That should be made clear in the standard as well. No

Re: [Numpy-discussion] Docstring standard: how to specify variable types

2008-01-24 Thread Stefan van der Walt
Hi Robert On Thu, Jan 24, 2008 at 01:15:13PM -0600, Robert Kern wrote: 5. Is the {'hi', 'ho'} syntax used when a parameter can only assume a limited number of values? In Python {} is a dictionary, so why not use ('hi','ho') instead? Either would be fine. IIRC, the {}

Re: [Numpy-discussion] Docstring standard: how to specify variable types

2008-01-24 Thread Charles R Harris
On Jan 24, 2008 1:53 PM, Stefan van der Walt [EMAIL PROTECTED] wrote: Hi Robert On Thu, Jan 24, 2008 at 01:15:13PM -0600, Robert Kern wrote: 5. Is the {'hi', 'ho'} syntax used when a parameter can only assume a limited number of values? In Python {} is a dictionary, so why

[Numpy-discussion] Docstring standard: how to specify variable types

2008-01-23 Thread Stefan van der Walt
Hi all, The numpy documentation standard example shows: Parameters -- var1 : array_like Array_like means all those objects -- lists, nested lists, etc. -- that can be converted to an array. var2 : integer Write out the full type

Re: [Numpy-discussion] Docstring standard: how to specify variable types

2008-01-23 Thread Charles R Harris
On Jan 23, 2008 6:55 AM, Stefan van der Walt [EMAIL PROTECTED] wrote: Hi all, The numpy documentation standard example shows: Parameters -- var1 : array_like Array_like means all those objects -- lists, nested lists, etc. -- that can be converted to an