File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 11"""
2- * What is this pattern about?
2+ What is this pattern about?
33It decouples the creation of a complex object and its representation,
44so that the same process can be reused to build objects from the same
55family.
66This is useful when you must separate the specification of an object
77from its actual representation (generally for abstraction).
88
9- *What does this example do?
10-
9+ What does this example do?
1110The first example achieves this by using an abstract base
1211class for a building, where the initializer (__init__ method) specifies the
1312steps needed, and the concrete subclasses implement these steps.
@@ -22,16 +21,15 @@ class for a building, where the initializer (__init__ method) specifies the
2221In general, in Python this won't be necessary, but a second example showing
2322this kind of arrangement is also included.
2423
25- *Where is the pattern used practically?
26-
27- *References:
28- https://sourcemaking.com/design_patterns/builder
24+ Where is the pattern used practically?
25+ See: https://sourcemaking.com/design_patterns/builder
2926
30- * TL;DR
27+ TL;DR
3128Decouples the creation of a complex object and its representation.
3229"""
3330
3431
32+
3533# Abstract Building
3634class Building :
3735 def __init__ (self ) -> None :
You can’t perform that action at this time.
0 commit comments