From charlesreid1

Central starting point for all things related to design patterns

What Are Design Patterns

Design patterns are like conceptual recipes, ready-made abstractions, that help solve different programming problems.


Python

There are a lot of different programming patterns possible in Python.

Creational Patterns

Python/Borg - singleton with shared-state instances

Python/Singleton - see Python/Borg pattern

Python/Factory - delegate a special function/method to creating instances of a class

Python/Builder - a builder receives configurations, settings, and parameters, and handles the assembly of an object


Structural Patterns

Python/Decorator - not so much a pattern as much as a capability, a decorator wraps functionality with more functionality


Behavioral Patterns

Python/Registry - a way of registering subclasses of a given class


References

https://github.com/faif/python-patterns

Flags

Template:DesignPatternsFlag