When writing a python module and functions in it, I have some "public" functions that are supposed to be exposed to outsiders, but some other "private" functions that are only supposed to be seen and used locally and internally.
I understand in python there is no absolute private functions. But what is the best, most neat, or most used style to distinguish "public" functions and "private" functions?
I list some of the styles I know:
- use
__all__
in module file to indicate its "public" functions (What's the python __all__ module level variable for?) - use underscore at the beginning of name of "private" functions
Is there any other idea or convention that people use?
Thank you very much!