On 2009-11-09, Joshua Bronson wrote:

> I'd like to be able to associate a docstring with an instance
> attribute in such a way that autodoc will discover it along with the
> rest of the documentation for the class's properties, methods, and
> class attributes.

The following is the convention used in the Docutils sources. I don't know
whether it currently works, but it might be worth considering::

  class Foo:
      parrot = "dead"
      """class attribute docstring"""
      
      def __init__(self):
           self.bar = 1
           """instance attribute docstring"""
           
Proper working would require to reassign the instance attribute docstring from
Foo.__init__ to Foo...

Günter


--~--~---------~--~----~------------~-------~--~----~
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