Design Patterns In Python
Design Patterns Introduction(设计模式介绍)
实现:design_patterns/strategy.py
示例:examples/strategy_example.py
实现:design_patterns/observer.py
示例:examples/observer_example.py
实现:design_patterns/decorator.py
示例:examples/decorator_example.py
实现:design_patterns/factory_method.py
示例:examples/pizza_factory_example.py
实现:design_patterns/abstract_factory.py
示例:examples/pizza_factory_example_2.py
实现:design_patterns/singleton_decorator.py
示例:examples/singleton_decorator_example.py
实现:design_patterns/singleton_baseclass.py
示例:examples/singleton_baseclass_example.py
实现:design_patterns/singleton_metaclass.py
示例:examples/singleton_metaclass_example.py
实现:design_patterns/command_pattern.py
示例:examples/command_pattern_example.py
实现:design_patterns/adapter_pattern.py
示例:examples/adapter_pattern_example.py
示例:examples/facade_pattern_example.py
实现:design_patterns/template_method.py
示例:examples/template_method_example.py
实现:design_patterns/iterator_pattern.py
实现:design_patterns/composite_pattern.py
示例:examples/composite_pattern_example.py
实现:design_patterns/state_pattern.py
示例:examples/state_pattern_example.py