python 设计模式(二) 六大设计原则一 单一职责原则(SRP)

单一职责原则(single responsibility principle)         简称SRP。There should never be more than one reason for a class to change.仅有一种缘由引发类的改变。一个类只负责一个职责。 python 单一职责原则 这地址讲的很好,但不是用python语言实现的,在这里我用python语言实现一下。
相关文章
相关标签/搜索