forked from faif/python-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request faif#211 from lucasloisp/short-descriptions
Add short descriptions to Abstract Factory, Builder and ObjectPool
- Loading branch information
Showing
3 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,28 @@ | |
# -*- coding : utf-8 -*- | ||
|
||
""" | ||
*What is this pattern about? | ||
It decouples the creation of a complex object and its representation, | ||
so that the same process can be reused to build objects from the same | ||
family. | ||
This is useful when you must separate the specification of an object | ||
from its actual representation (generally for abstraction). | ||
*What does this example do? | ||
This particular example uses a Director to abtract the | ||
construction of a building. The user specifies a Builder (House or | ||
Flat) and the director specifies the methods in the order necessary | ||
creating a different building dependding on the sepcified | ||
specification (through the Builder class). | ||
@author: Diogenes Augusto Fernandes Herminio <[email protected]> | ||
https://gist.github.com/420905#file_builder_python.py | ||
*Where is the pattern used practically? | ||
*References: | ||
https://sourcemaking.com/design_patterns/builder | ||
""" | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters