A hidden implementation keeps class internals inaccessible to client code, allowing the implementation to change without forcing changes in permitted users. In Python, leading underscores conventionally mark private state and helper methods. section 5.1
Public interface versus hidden detail
Client code should use a class's required public operations, not read `_x` or call `_calculate_pay()`. The class can later replace either hidden detail while preserving its public behavior. section 5.1
Apply the technique by following these rules:
- Make instance variables and methods private unless they must be public. section 5.1
- Use properties for controlled access without exposing state representation; reject invalid state and avoid setters for immutable objects. section 5.9
- Minimize dependencies between classes, following the Principle of Least Knowledge, also called the Law of Demeter. section 5.1 section 5.9
