#35 Ability to hide/unhide private variables selectively

Next Release
closed
Edward Loper
Epytext (19)
5
2008-01-31
2006-08-27
Anonymous
No

Hi,

I am currently using epydoc to document the pymsn
library, however it lacks the ability to hide unhide
private variables selectively.

I would like to run epydoc with --no-private but force
some private variables to show in the documentation
with for example a @documented tag, I need that because
all hooks starts with an _ (_on_message_received).

Thank you for your help, and for such a nice tool that
is epydoc.

--
Ali Sabil <ali.sabil@gmail.com>

Discussion

  • Edward Loper
    Edward Loper
    2006-08-29

    Logged In: YES
    user_id=195958

    The easiest way to do what I think you want is to define
    an __all__ variable, containing a list (or tuple) of
    public variable names). If epydoc notices an __all__
    variable in a module, then it will assume that every
    object whose name is listed there (and only those objects)
    is public. This variable is also used by Python's import
    machinery to decide which variables to import when you
    say "from some_module import *".

    So in your case, use __all__ to define the _hooks as
    public, and then use --no-private when running epydoc.

     
  • Edward Loper
    Edward Loper
    2008-01-31

    • status: open --> closed
     
  • Edward Loper
    Edward Loper
    2008-01-31

    Logged In: YES
    user_id=195958
    Originator: NO

    Unless I hear otherwise, I will assume that my proposed solution is acceptable; I am therefore closing this feature request.