I'm developing a module in Python which should be used by others users in my project. I came to a problem that I couldn't find a good answer:
How do I hide a method of an object from users, but I want to use it in other objects (different class).
By hiding it I mean indicating that shouldn't be used by them.
As far I understand it is not a clear usage of an underscore before the function because that indicates that the method is protected and shouldn't be used by objects of other classes.
EDIT: To clarify, the PEP-8 says:
_single_leading_underscore: weak "internal use" indicator. E.g.
from M import *
does not import objects whose name starts with an underscore.
Does this "internal use" implies internal use of object/class or internal use of the module? If I put an underscore in this function, would that be a "good" design decision?
(Thanks for the comments)