Conceptual
Login

Five Tips to Reduce Coupling in Python Code

Coupling is the degree of interdependence between software modules, the strength of the relationships among them; it can never be eliminated, since modules must cooperate, but it should be minimized and placed deliberately. It is reduced by avoiding deep inheritance, separating the creation of resources from their use, introducing abstractions, passing only the data a unit needs, and inserting intermediate data structures as a separation layer. This belongs to software design and architecture, closely tied to cohesion and the SOLID and GRASP principles.