Is the solution as simple as the attached diff? It works for me, but I don't understand all the implications.

Mike

On 09/29/2010 06:52 PM, Joe Harrington wrote:
It seems that the "Other parameters" section is not
getting included in the output.
The "Other parameters" is not often used in numpy because there are
not generally dozens of "tweaking" parameters in its basic numerical
routines.  It will probably be more common in certain scipy pages, and
if other packages adopted the format, it could get used a lot.
Plotting packages, for example, often have a ton of "tweaking"
parameters (line width, line color, line pattern, major axis tick
interval, minor axis tick interval, x axis label, y axis label, title,
axis font, title font, tick strings, etc.) and could use this section
to good effect to sort those out from the parameters of primary
interest.  This would keep the output section and so forth near the
top of the docstring for easy reading.

So, it would be better to fix the problem than deprecate the section.

--jh--
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA

Changes in HEAD
        Modified doc/sphinxext/docscrape.py
diff --git a/doc/sphinxext/docscrape.py b/doc/sphinxext/docscrape.py
index 63fec42..cdd413c 100644
--- a/doc/sphinxext/docscrape.py
+++ b/doc/sphinxext/docscrape.py
@@ -285,7 +285,7 @@ class NumpyDocString(object):
             if not section.startswith('..'):
                 section = ' '.join([s.capitalize() for s in section.split(' ')])
             if section in ('Parameters', 'Attributes', 'Methods',
-                           'Returns', 'Raises', 'Warns'):
+                           'Returns', 'Raises', 'Warns', 'Other Parameters'):
                 self[section] = self._parse_param_list(content)
             elif section.startswith('.. index::'):
                 self['index'] = self._parse_index(section, content)
@@ -381,7 +381,7 @@ class NumpyDocString(object):
         out += self._str_signature()
         out += self._str_summary()
         out += self._str_extended_summary()
-        for param_list in ('Parameters','Returns','Raises'):
+        for param_list in ('Parameters','Returns','Raises','Other Parameters'):
             out += self._str_param_list(param_list)
         out += self._str_section('Warnings')
         out += self._str_see_also(func_role)
        Modified doc/sphinxext/docscrape_sphinx.py
diff --git a/doc/sphinxext/docscrape_sphinx.py b/doc/sphinxext/docscrape_sphinx.py
index 9f4350d..29651b3 100644
--- a/doc/sphinxext/docscrape_sphinx.py
+++ b/doc/sphinxext/docscrape_sphinx.py
@@ -178,7 +178,8 @@ class SphinxDocString(NumpyDocString):
         out += self._str_index() + ['']
         out += self._str_summary()
         out += self._str_extended_summary()
-        for param_list in ('Parameters', 'Returns', 'Raises'):
+        for param_list in ('Parameters', 'Returns', 'Raises',
+                           'Other Parameters'):
             out += self._str_param_list(param_list)
         out += self._str_warnings()
         out += self._str_see_also(func_role)

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to