I have a package mypack
with modules mod_a
and mod_b
in it. I intend the the package itself and mod_a
to be imported free
I prefix private modules with an underscore to communicate the intent to the user. In your case, this would be mypack._mod_b
This is in the same spirit (but not completely analogous to) the PEP8 recommendation to name C-extension modules with a leading underscore when it’s wrapped by a Python module; i.e., _socket
and socket
.