[spec] Clarification: Are symbols not listed in __all__
ever considered public?
#1829
Labels
topic: documentation
Documentation-related issues and PRs
According to https://typing.readthedocs.io/en/latest/guides/libraries.html#library-interface-public-and-private-symbols:
Does this mean that if
__all__
is present: ① A symbol is public if and only if it is listed in__all__
or ② If a symbol is listed in__all__
, it is public, but things not listed in__all__
can still be considered public as well?For example:
Are
TypeVar
andT
considered public members ofmodule.py
? If so, what is the suggested way to exclude them?T
could be renamed to_T
, but is one supposed to dofrom typing import TypeVar as _TypeVar
, if one wantsTypeVar
to not be considered a public member ofmodule
?The text was updated successfully, but these errors were encountered: