Python 3-4 package

Python wrapper

In the object-oriented programming method, Encapsulation ( Encapsulation [ɪn,kæpsə'leɪʃən]  ) refers to a method of partially wrapping and hiding the implementation details of attributes.

Encapsulation can be considered as a protective barrier to prevent the code and data of this class from being randomly accessed by the code defined by the external class.

To access the code and data of this type, you must pass strict interface control.

The main function of encapsulation is that we can modify our own implementation code without modifying the program fragments that call our code.

Appropriate packaging can make the code easier to understand and maintain, and also strengthen the security of the code.

Advantages of packaging

  • 1. Good packaging can reduce coupling.

Guess you like

Origin blog.csdn.net/weixin_43955170/article/details/113105570