Python has object-oriented programming and functional programming. When it comes to encapsulation, you don't have to think about anything, just use object orientation. If multiple methods use the same field, encapsulate this subsection into the object.
python-miscellaneous notes 5
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326076451&siteId=291194637
Recommended
Ranking