Documenting members

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lasse Vågsæther Karlsen

    #1

    Documenting members

    I have a Connection class that exposes members for the hostname, etc.

    ie.

    class Connection:
    def __init__(...):
    self.server = server

    is there any way to document this "server" member? The only way I know
    of right now is to expose it as a property and add the doc string to
    that definition.

    I've tried finding an example in the lib code installed with Python but
    can't seem to track down anything that is documented like that.

    --
    Lasse Vågsæther Karlsen

    mailto:lasse@vk arlsen.no
    PGP KeyID: 0x2A42A1C2
  • Miki Tebeka

    #2
    Re: Documenting members

    Hello Lasse,
    [color=blue]
    > I have a Connection class that exposes members for the hostname, etc.
    >
    > ie.
    >
    > class Connection:
    > def __init__(...):
    > self.server = server
    >
    > is there any way to document this "server" member? The only way I know
    > of right now is to expose it as a property and add the doc string to
    > that definition.
    >
    > I've tried finding an example in the lib code installed with Python but
    > can't seem to track down anything that is documented like that.[/color]
    IIRC Epydoc can do it. However you can't place the documentation directly
    next to the member but in the class document string.

    Bye.
    --
    ------------------------------------------------------------------------
    Miki Tebeka <mtebeka@qualco mm.com>

    The only difference between children and adults is the price of the toys

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.1 (Cygwin)

    iD8DBQFDO+eB8jA dENsUuJsRAm3lAK Cr7d9WfrQL4zFE/N6YQvemrnN51QCf dpW5
    wd3W/o3dYH3KEhSIyZ2O P6s=
    =alXx
    -----END PGP SIGNATURE-----

    Comment

    Working...