Chris Withers schrieb:
> Hi All,
> 
> In Sphinx docs, how would I go about documenting the return type of a 
> function or method?
> 
> Specifically, if a method returns an instance of a class, how can I link 
> to that class's documentation in the documentation for the return type 
> of the method?

For Python methods, neither return nor parameter types are supported in
a special way.  (This will change; I intend to allow 3k-style annotations
at some point which could be used for type info.)

One convention, other than simply putting it into the prose, is to put doc
fields à la Epydoc into the documentation, like this:

.. function:: foo(x)

   :param x: blah
   :rtype: :class:`Bar`

   Return the foo.

Georg


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to