Now that we have seen some examples of good and bad coupling and also cohesion, let us get to the strategies and approaches that a software designer or architect can use to reduce the effects of these aspects on modifiability in order to improve the modifiability of the software system.
A module should to and mark a set of functions, classes, or methods as the interface it provides to external code. This can be thought of as the API of this module, which is exported from it. Any external code which uses this API would become a client to the module.
Methods or functions which the module considers internal to its function, and which do not make up its API, should either be explicitly made private to the module or should be documented as such.
In Python, which doesn't provide variable access scope for functions or class methods, this can be done by conventions such as prefixing the function name with a single or double underscore...