[docs] index directives for section text

Chris Jerdonek chris.jerdonek at gmail.com
Thu Jul 26 10:44:41 CEST 2012


When marking section text for inclusion in the index, is there a
preference for whether the index directive should occur immediately
before or after the section header?

For example, "generator, function" in the index links here:

http://docs.python.org/dev/reference/datamodel.html#index-36

But the "Generator functions" header is not visible after clicking the
link without scrolling (at least for me) because the directive appears
after the header in reference/datamodel.rst:

    Generator functions
       .. index::
          single: generator; function
          single: generator; iterator

This seems like common practice in some areas of the documentation,
but it seems like the result might be less desirable.

Thanks,
--Chris


More information about the docs mailing list