辛夷坞

涧户寂无人,纷纷开且落

By - Christen

Some Thoughts on Object-Oriented Design

Apress Beginning Python From Novice to Professional Gather what belongs together. If a function manipulates a global variable, the two of them might be better off in a class, as an attribute and a method. Don’t let objects become too intimate. Methods should mainly be concerned with the attributes of their own instance. Let other instances manage their own state.