python-patterns
GitHub describes it as A collection of design patterns/idioms in Python. The repository metadata lists Python as its primary language. This article stays within the project description and details documented in the GitHub repository README.
faif/python-patterns: python-patterns
GitHub describes it as A collection of design patterns/idioms in Python. The repository metadata lists Python as its primary language. This article stays within the project description and details documented in the GitHub repository README.
Repository scope
GitHub describes it as A collection of design patterns/idioms in Python. The repository metadata lists Python as its primary language. The README describes the project this way: Remember that each pattern has its own trade-offs. And you need to pay attention more to why you're choosing a certain pattern than to how to implement it.
Creational Patterns
The README section "Creational Patterns" states: Patterns that deal with object creation , abstracting and controlling how instances are made.
Creational Patterns
The README section "Creational Patterns" states: | Pattern | Description | |:-------:| ----------- | | abstract factory | use a generic function with specific factories | | borg | a singleton with shared-state among instances | | builder | instead of using multiple constructors, builder object receives parameters and returns constructed objects | | factory | delegate a specialized function/method to create instances | | lazy evaluation | lazily-evaluated property pattern in Python | | pool | preinstantiate and maintain a group of instances of the same type | | prototype | use a factory and clones of a prototype for new instances (if instantiation is expensive) |
Structural Patterns
The README section "Structural Patterns" states: Patterns that define how classes and objects are composed to form larger, flexible structures.
Editorial conclusion
The repository README is the source for this review. It does not replace a local installation or an independent test.
Community notes