title: How can I provide Sphinx documentation for a namedtuple (with autodoc)?
body: <p>I am trying to document a Python project with Sphinx, but I'm having trouble combining the <code>autodoc</code> extension with a <code>namedtuple</code> generated class.</p>
  
  <p>In one document, <code>gammatone.rst</code>, I have:</p>
  
  <pre><code>:mod:`gammatone` -- gammatone filterbank toolkit
  ================================================
  
  .. automodule:: gammatone
     :members:
  .. automodule:: gammatone.coeffs
     :members:
  </code></pre>
  
  <p>In my <code>gammatone/coeffs.py</code>, I have:</p>
  
  <pre><code>from collections import namedtuple
  
  ERBFilterCoeffs = namedtuple(
      'ERBFilterCoeffs', # Most parameters omitted
      [
          'A0',
          'gain',
      ])
  </code></pre>
  
  <p>The code generated by <code>namedtuple</code> includes very generic docstrings that Sphinx's <code>autodoc</code> module picks up and includes. I'd rather document the class properly myself, without forgoing <code>autodoc</code> for the rest of the module.</p>
  
  <p>I've tried putting something like this just before the class:</p>
  
  <pre><code>"""
  .. class:: ERBFilterCoeffs(A0, gain)
  :param A0: A0 coefficient
  :param gain: Gain coefficient
  
  Magic coefficients.
  """
  </code></pre>
  
  <p>...but it doesn't show up in the generated docs. Putting it after the class results in it being nested underneath the generic class documentation, rather than replacing it.</p>
  
  <p>How do I simply tell Sphinx (and the <code>autodoc</code> extension) to use my documentation for the <code>ERBFilterCoeffs</code> class instead of that generated by <code>namedtuple</code>?</p>