Python 使用一等函数实现设计模式 - 重构策略模式

""" >>> from promotions import * >>> joe = Customer('John Doe', 0) >>> ann = Customer('Ann Smith', 1100) >>> cart = [LineItem('banana', 4, .5), ... LineItem('apple', 10, 1.
相关文章
相关标签/搜索