• 2024-06-11流畅的python--第十章 使用一等函数实现设计 模式
    经典的策略模式示例10-1实现Order类,支持插入式折扣策略fromabcimportABC,abstractmethodfromcollections.abcimportSequencefromdecimalimportDecimalfromtypingimportNamedTuple,OptionalclassCustomer(NamedTuple):name:strfidelity:intcl