Hi Thomi, 2013/4/14 Thomi Richards <[email protected]>: > On 13 April 2013 17:35, Takayuki Shimizukawa <[email protected]> wrote: >> I got the result that you expected with bot Sphinx-1.1.3 and 1.2b1. >> Did you solve your problem yet? > > I figured out that my problem was because I didn't realise that > module-level docstrings need to appear *before* any import statements. > So for example, in a module, this works: -snip- > Is this a bug in sphinx, or is this a python requirement that I never > realised before?
It is a python's specification. A string literal which appears as the first expression in a class, function or module. http://docs.python.org/2.7/glossary.html#term-docstring If you want to place docstring after some statements (import or else), you can be set __doc__ variable it. import os __doc__ = "Docstring here" Regards, -- Takayuki SHIMIZUKAWA http://about.me/shimizukawa -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sphinx-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
