title: Sphinx - autodata shows str.__doc__
body: <p>I'm trying to document my python code with Sphinx, but I found a problem documenting some data instantiated with <code>exec</code>; I have a table with names and values that I need to instantiate. </p>
  
  <p>So in my code I wrote something like:</p>
  
  <pre><code>my_vars = [{'name': 'var1', 'value': 'first'},
             {'name': 'var2', 'value': 'second'}]
  
  for var in my_vars:
      exec("{var[name]} = '{var[value]}'".format(var=var))
  </code></pre>
  
  <p>The problem is with Sphinx: since I'd like to maintain just the source code I used <code>autodata</code>, the corrisponding lines from my <code>.rst</code> file are:</p>
  
  <pre><code>.. autodata:: mymodule.var1
  
  .. autodata:: mymodule.var2
  </code></pre>
  
  <p>that when built gave me this:</p>
  
  <pre><code>mymodule.var1 = 'first'
      str(string[, encoding[, errors]]) -&gt; str
  
      Create a new string object from the given encoded string.
      encoding defaults to the current default string encoding.
      errors can be ‘strict’, ‘replace’ or ‘ignore’ and defaults to ‘strict’.
  
  mymodule.var2 = 'second'
      str(string[, encoding[, errors]]) -&gt; str
  
      Create a new string object from the given encoded string.
      encoding defaults to the current default string encoding.
      errors can be ‘strict’, ‘replace’ or ‘ignore’ and defaults to ‘strict’.
  </code></pre>
  
  <p>I think autodata goes looking into <code>var1.__doc__</code> for a doc string and there found <code>str.__doc__</code> (that is the message shown before).</p>
  
  <p>I really don't know what to do and I'm searching for a way of not showing that ugly doc string (but still maintaining <code>mymodule.var1 = 'first'</code>).</p>
  
  <p>Or maybe even better a way to show my own doc, like: <code>var1 is this.</code> (but I wouldn't know where to put it).</p>