将pydoc用于非公共/私有类

时间:2012-08-20 15:16:52

标签: python private pydoc private-class

当我使用_作为类名的前缀时(另请参阅http://docs.python.org/tutorial/classes.html#private-variables-and-class-local-references"Private" (implementation) class in Python),该类变为非公开,并且不会被pydoc显示:

class _DoNotShowMeInPydoc:
  """Class Documentation which is not displayed"""
  ...

这正是我想要的,因为这个类只在内部使用,对使用该模块的人来说并不重要。

但是 - 如果有人想知道我的模块的内部结构,当然还有文件记录的话会怎样? pydoc是否有标志或选项来显示非公开类?

0 个答案:

没有答案