[Doc-SIG] Python docs in reST

Skip Montanaro skip at pobox.com
Wed May 18 15:17:56 CEST 2005


    Michael> Yup. One of the biggest problems I've had with autogenerating
    Michael> documentation is that there is usually no way to mark a
    Michael> method/function as private other than the double underscore
    Michael> name mangling (which isn't usually what you want to do).

Actually, there are two ways:

    * single leading underscore => this attribute is private (this is simply
      a convention based on the "we're all adults here" rubric)

    * double leading underscores without double trailing underscores => the
      compiler mangles the name, IMHO mostly to prevent accidental stomping
      on attributes in a subclass, not so much to make it truly private

Skip


More information about the Doc-SIG mailing list