Another simple way is to document explicitely the attribute in the class
docstring :

class Foo:
    """.. attribute bar::
           A nice doc
    """"
    def __init__(self):
        self.bar = 1


My 2 cents

Christophe

2009/11/10 Edward Z. Yang <[email protected]>

>
> Excerpts from Joshua Bronson's message of Mon Nov 09 17:31:47 -0500 2009:
> > class Foo:
> >     def __init__(self):
> >         #: i can haz instance attribute docstring?
> >         self.bar = 1
>
> The way I currently work around this is as follows:
>
> class Foo:
>  #: yes can haz instance attribute docstring
>  bar = None
>  def __init__(self):
>    self.bar = 1
>
> Cheers,
> Edward
>
> >
>

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