diff --git a/pdoc/__init__.py b/pdoc/__init__.py index dd1c6e59..5c097e92 100644 --- a/pdoc/__init__.py +++ b/pdoc/__init__.py @@ -180,13 +180,14 @@ class GoldenRetriever(Dog): - If `__all__` is defined in the module, then all identifiers in that list will be considered public. No other identifiers will be considered public. - If `__all__` is not defined, then pdoc will consider all members public that - 1. do not start with an underscore + 1. do not start with an underscore, + 2. don't have `@private` in their docstring, 2. and are defined in the current module (i.e. they are not imported). In general, we recommend keeping these conventions: - If you want to document a private member, consider making it public. -- If you want to hide a public member, consider making it private. +- If you want to hide a public member, consider making it private or add `@private` to their docstring, - If you want to document a special `__dunder__` method, the recommended way to do so is to not document the dunder method specifically, but to add some usage examples in the class documentation.