(三)python 设计模式 --- 策略模式

1. 根据需求,经过实现模板接口对象,将其注入实现策略模式 # -*- coding: utf-8 -*- ###################### # 策略模式 模板接口 # ###################### class TravelStrategy(object): ''' 出行策略 ''' def travelAlgorithm(self):
相关文章
相关标签/搜索