title: Is 3-space indentation required in reST?
body: <p>I'm documenting my Python code using Sphinx, and read <a href="https://devguide.python.org/documenting/#style-guide" rel="noreferrer">in the Python developer's guide</a> (and I think elsewhere as well) that reST files use an indentation of 3 spaces:</p>
  
  <blockquote>
    <p>All reST files use an indentation of 3 spaces; no tabs are allowed.</p>
  </blockquote>
  
  <p>This is the case for the example I copied for my index file, and some other files where my IDE picked up the 3-space indentation and used it for the whole page. The <code>sphinx-apidoc</code> extension also uses 3 spaces for the <code>modules.rst</code> file it builds.</p>
  
  <p>On the other hand, because Python uses 4-space indentation, all my docstrings are indented with 4 spaces. Moreover the <code>.. automodule::</code> directives generated by <code>sphinx-apidox</code> are indented with 4 spaces.</p>
  
  <p>The point is, it all still <em>works</em>! So I'm left wondering whether the 3-space indentation thing is a requirement, or if it's good practice, but only in terms of style? (And if so, why, when all things Python are 4-space indented?)</p>
  
  <p>Or are there cases where not having 3-space indentation will break my build?</p>
  
  <h2>Other places I've looked</h2>
  
  <ul>
  <li>The <a href="http://www.sphinx-doc.org/en/stable/rest.html#rst-primer" rel="noreferrer">Sphinx reStructuredText Primer</a> doesn't mention a specific number of spaces, only:
  
  <blockquote>
    <p>As in Python, indentation is significant in reST, so all lines of the same paragraph must be left-aligned to the same level of indentation.</p>
  </blockquote></li>
  <li>This <a href="https://stackoverflow.com/questions/18876046/how-can-i-change-the-default-indentation-in-sphinx">(unanswered) SO question</a>, which is about lists specifically, not spacing generally</li>
  <li>The <a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#indentation" rel="noreferrer">reStructuredText Markup Specification</a> only mentions 3 spaces in reference to <a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#footnotes" rel="noreferrer">footnotes</a>.</li>
  <li>This <a href="https://github.com/benoitbryon/documentation-style-guide-sphinx/issues/9" rel="noreferrer">issue on GitHub</a>, though I <em>think</em> this issue here is the mixture of indentation levels for different elements.</li>
  </ul>
  
  <hr>
  
  <p>I'm beginning to think the Python developer's guide might be the anomaly, rather than everything else, especially since in all my searching I've come across basically no discussion of the "3-or-4 space problem" when working with Sphinx and Python.</p>