diff --git a/patterns/behavioral/chain_of_responsibility__py2.py b/patterns/behavioral/chain_of_responsibility__py2.py index af6d4e35..94b0c116 100644 --- a/patterns/behavioral/chain_of_responsibility__py2.py +++ b/patterns/behavioral/chain_of_responsibility__py2.py @@ -17,7 +17,7 @@ As a variation some receivers may be capable of sending requests out in several directions, forming a `tree of responsibility`. -*TL;DR80 +*TL;DR Allow a request to pass down a chain of receivers until it is handled. """ diff --git a/patterns/behavioral/chain_of_responsibility__py3.py b/patterns/behavioral/chain_of_responsibility__py3.py index 56899043..2b86d193 100644 --- a/patterns/behavioral/chain_of_responsibility__py3.py +++ b/patterns/behavioral/chain_of_responsibility__py3.py @@ -17,7 +17,7 @@ As a variation some receivers may be capable of sending requests out in several directions, forming a `tree of responsibility`. -*TL;DR80 +*TL;DR Allow a request to pass down a chain of receivers until it is handled. """ diff --git a/patterns/behavioral/command.py b/patterns/behavioral/command.py index ea764cc3..4a39420a 100644 --- a/patterns/behavioral/command.py +++ b/patterns/behavioral/command.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- """ -*TL;DR80 +*TL;DR Encapsulates all information needed to perform an action or trigger an event. *Examples in Python ecosystem: diff --git a/patterns/behavioral/iterator.py b/patterns/behavioral/iterator.py index b92dcb75..625b77e3 100644 --- a/patterns/behavioral/iterator.py +++ b/patterns/behavioral/iterator.py @@ -5,7 +5,7 @@ http://ginstrom.com/scribbles/2007/10/08/design-patterns-python-style/ Implementation of the iterator pattern with a generator -*TL;DR80 +*TL;DR Traverses a container and accesses the container's elements. """ diff --git a/patterns/behavioral/mediator.py b/patterns/behavioral/mediator.py index 27f3f2de..073596c2 100644 --- a/patterns/behavioral/mediator.py +++ b/patterns/behavioral/mediator.py @@ -7,7 +7,7 @@ Objects in a system communicate through a Mediator instead of directly with each other. This reduces the dependencies between communicating objects, thereby reducing coupling. -*TL;DR80 +*TL;DR Encapsulates how a set of objects interact. """ diff --git a/patterns/behavioral/memento.py b/patterns/behavioral/memento.py index 9ad6198b..f7acd254 100644 --- a/patterns/behavioral/memento.py +++ b/patterns/behavioral/memento.py @@ -4,7 +4,7 @@ """ http://code.activestate.com/recipes/413838-memento-closure/ -*TL;DR80 +*TL;DR Provides the ability to restore an object to its previous state. """ diff --git a/patterns/behavioral/observer.py b/patterns/behavioral/observer.py index b5990475..2590de14 100644 --- a/patterns/behavioral/observer.py +++ b/patterns/behavioral/observer.py @@ -4,7 +4,7 @@ """ http://code.activestate.com/recipes/131499-observer-pattern/ -*TL;DR80 +*TL;DR Maintains a list of dependents and notifies them of any state changes. *Examples in Python ecosystem: diff --git a/patterns/behavioral/specification.py b/patterns/behavioral/specification.py index 5c77370e..4959241e 100644 --- a/patterns/behavioral/specification.py +++ b/patterns/behavioral/specification.py @@ -4,7 +4,7 @@ """ @author: Gordeev Andrey -*TL;DR80 +*TL;DR Provides recombination business logic by chaining together using boolean logic. """ diff --git a/patterns/behavioral/state.py b/patterns/behavioral/state.py index 46508c3a..0bf2d012 100644 --- a/patterns/behavioral/state.py +++ b/patterns/behavioral/state.py @@ -6,7 +6,7 @@ http://ginstrom.com/scribbles/2007/10/08/design-patterns-python-style/ -*TL;DR80 +*TL;DR Implements state as a derived class of the state pattern interface. Implements state transitions by invoking methods from the pattern's superclass. """ diff --git a/patterns/behavioral/strategy.py b/patterns/behavioral/strategy.py index fd80996a..2dd245fc 100644 --- a/patterns/behavioral/strategy.py +++ b/patterns/behavioral/strategy.py @@ -6,7 +6,7 @@ Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it. -*TL;DR80 +*TL;DR Enables selecting an algorithm at runtime. """ diff --git a/patterns/behavioral/template.py b/patterns/behavioral/template.py index 1c6940eb..c6919b31 100644 --- a/patterns/behavioral/template.py +++ b/patterns/behavioral/template.py @@ -4,7 +4,7 @@ """ An example of the Template pattern in Python -*TL;DR80 +*TL;DR Defines the skeleton of a base algorithm, deferring definition of exact steps to subclasses. diff --git a/patterns/behavioral/visitor.py b/patterns/behavioral/visitor.py index 6c5e97eb..9aac35d3 100644 --- a/patterns/behavioral/visitor.py +++ b/patterns/behavioral/visitor.py @@ -4,7 +4,7 @@ """ http://peter-hoffmann.com/2010/extrinsic-visitor-pattern-python-inheritance.html -*TL;DR80 +*TL;DR Separates an algorithm from an object structure on which it operates. An interesting recipe could be found in diff --git a/patterns/creational/abstract_factory.py b/patterns/creational/abstract_factory.py index f1c80ac3..1690ca75 100644 --- a/patterns/creational/abstract_factory.py +++ b/patterns/creational/abstract_factory.py @@ -29,7 +29,7 @@ https://sourcemaking.com/design_patterns/abstract_factory http://ginstrom.com/scribbles/2007/10/08/design-patterns-python-style/ -*TL;DR80 +*TL;DR Provides a way to encapsulate a group of individual factories. """ diff --git a/patterns/creational/borg.py b/patterns/creational/borg.py index 44afa449..e329d130 100644 --- a/patterns/creational/borg.py +++ b/patterns/creational/borg.py @@ -36,7 +36,7 @@ *References: https://fkromer.github.io/python-pattern-references/design/#singleton -*TL;DR80 +*TL;DR Provides singleton-like behavior sharing state between instances. """ diff --git a/patterns/creational/builder.py b/patterns/creational/builder.py index 72ff0bc1..73e0f7f8 100644 --- a/patterns/creational/builder.py +++ b/patterns/creational/builder.py @@ -30,7 +30,7 @@ class for a building, where the initializer (__init__ method) specifies the *References: https://sourcemaking.com/design_patterns/builder -*TL;DR80 +*TL;DR Decouples the creation of a complex object and its representation. """ diff --git a/patterns/creational/factory.py b/patterns/creational/factory.py index 0143854f..b2a36f05 100644 --- a/patterns/creational/factory.py +++ b/patterns/creational/factory.py @@ -24,7 +24,7 @@ *References: http://ginstrom.com/scribbles/2007/10/08/design-patterns-python-style/ -*TL;DR80 +*TL;DR Creates objects without having to specify the exact class. """ diff --git a/patterns/creational/lazy_evaluation.py b/patterns/creational/lazy_evaluation.py index a2f17d58..06af0100 100644 --- a/patterns/creational/lazy_evaluation.py +++ b/patterns/creational/lazy_evaluation.py @@ -18,7 +18,7 @@ werkzeug https://github.com/pallets/werkzeug/blob/5a2bf35441006d832ab1ed5a31963cbc366c99ac/werkzeug/utils.py#L35 -*TL;DR80 +*TL;DR Delays the eval of an expr until its value is needed and avoids repeated evals. """ diff --git a/patterns/creational/pool.py b/patterns/creational/pool.py index 1650cd27..c0ee600e 100644 --- a/patterns/creational/pool.py +++ b/patterns/creational/pool.py @@ -27,7 +27,7 @@ http://stackoverflow.com/questions/1514120/python-implementation-of-the-object-pool-design-pattern https://sourcemaking.com/design_patterns/object_pool -*TL;DR80 +*TL;DR Stores a set of initialized objects kept ready to use. """ diff --git a/patterns/creational/prototype.py b/patterns/creational/prototype.py index b4d25184..fe2ff16d 100644 --- a/patterns/creational/prototype.py +++ b/patterns/creational/prototype.py @@ -20,7 +20,7 @@ Below provides an example of such Dispatcher, which contains three copies of the prototype: 'default', 'objecta' and 'objectb'. -*TL;DR80 +*TL;DR Creates new object instances by cloning prototype. """ diff --git a/patterns/fundamental/delegation_pattern.py b/patterns/fundamental/delegation_pattern.py index ad41ac1e..81ec1832 100644 --- a/patterns/fundamental/delegation_pattern.py +++ b/patterns/fundamental/delegation_pattern.py @@ -5,7 +5,7 @@ Reference: https://en.wikipedia.org/wiki/Delegation_pattern Author: https://github.com/IuryAlves -*TL;DR80 +*TL;DR Allows object composition to achieve the same code reuse as inheritance. """ diff --git a/patterns/structural/3-tier.py b/patterns/structural/3-tier.py index d5a7a148..4e45844c 100644 --- a/patterns/structural/3-tier.py +++ b/patterns/structural/3-tier.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- """ -*TL;DR80 +*TL;DR Separates presentation, application processing, and data management functions. """ diff --git a/patterns/structural/adapter.py b/patterns/structural/adapter.py index 5fd32cfe..e7a6e608 100644 --- a/patterns/structural/adapter.py +++ b/patterns/structural/adapter.py @@ -27,7 +27,7 @@ https://sourcemaking.com/design_patterns/adapter http://python-3-patterns-idioms-test.readthedocs.io/en/latest/ChangeInterface.html#adapter -*TL;DR80 +*TL;DR Allows the interface of an existing class to be used as another interface. """ diff --git a/patterns/structural/bridge.py b/patterns/structural/bridge.py index 879205dd..3d9a4d93 100644 --- a/patterns/structural/bridge.py +++ b/patterns/structural/bridge.py @@ -5,7 +5,7 @@ *References: http://en.wikibooks.org/wiki/Computer_Science_Design_Patterns/Bridge_Pattern#Python -*TL;DR80 +*TL;DR Decouples an abstraction from its implementation. """ diff --git a/patterns/structural/composite.py b/patterns/structural/composite.py index 1244b785..12f2dcaf 100644 --- a/patterns/structural/composite.py +++ b/patterns/structural/composite.py @@ -25,7 +25,7 @@ https://en.wikipedia.org/wiki/Composite_pattern https://infinitescript.com/2014/10/the-23-gang-of-three-design-patterns/ -*TL;DR80 +*TL;DR Describes a group of objects that is treated as a single instance. """ diff --git a/patterns/structural/decorator.py b/patterns/structural/decorator.py index e5252f9c..c06e987b 100644 --- a/patterns/structural/decorator.py +++ b/patterns/structural/decorator.py @@ -23,7 +23,7 @@ *References: https://sourcemaking.com/design_patterns/decorator -*TL;DR80 +*TL;DR Adds behaviour to object without affecting its class. """ diff --git a/patterns/structural/facade.py b/patterns/structural/facade.py index 5caef955..64285a04 100644 --- a/patterns/structural/facade.py +++ b/patterns/structural/facade.py @@ -27,7 +27,7 @@ https://fkromer.github.io/python-pattern-references/design/#facade http://python-3-patterns-idioms-test.readthedocs.io/en/latest/ChangeInterface.html#facade -*TL;DR80 +*TL;DR Provides a simpler unified interface to a complex system. """ diff --git a/patterns/structural/flyweight__py2.py b/patterns/structural/flyweight__py2.py index b3dae107..727ad5ea 100644 --- a/patterns/structural/flyweight__py2.py +++ b/patterns/structural/flyweight__py2.py @@ -20,7 +20,7 @@ *References: http://codesnipers.com/?q=python-flyweights -*TL;DR80 +*TL;DR Minimizes memory usage by sharing data with other similar objects. """ diff --git a/patterns/structural/flyweight__py3.py b/patterns/structural/flyweight__py3.py index 53225fdb..4ca95f56 100644 --- a/patterns/structural/flyweight__py3.py +++ b/patterns/structural/flyweight__py3.py @@ -24,7 +24,7 @@ *Examples in Python ecosystem: https://docs.python.org/3/library/sys.html#sys.intern -*TL;DR80 +*TL;DR Minimizes memory usage by sharing data with other similar objects. """ diff --git a/patterns/structural/front_controller.py b/patterns/structural/front_controller.py index 580f57fe..e533e53d 100644 --- a/patterns/structural/front_controller.py +++ b/patterns/structural/front_controller.py @@ -4,7 +4,7 @@ """ @author: Gordeev Andrey -*TL;DR80 +*TL;DR Provides a centralized entry point that controls and manages request handling. """ diff --git a/patterns/structural/mvc.py b/patterns/structural/mvc.py index 6c7aa9ef..a95ef668 100644 --- a/patterns/structural/mvc.py +++ b/patterns/structural/mvc.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- """ -*TL;DR80 +*TL;DR Separates data in GUIs from the ways it is presented, and accepted. """ diff --git a/patterns/structural/proxy.py b/patterns/structural/proxy.py index 9890a2c3..b3b0091d 100644 --- a/patterns/structural/proxy.py +++ b/patterns/structural/proxy.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- """ -*TL;DR80 +*TL;DR Provides an interface to resource that is expensive to duplicate. """