faif / python-patterns

A collection of design patterns/idioms in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

what's the difference betwen builder.py and abstruct_factory.py

SeekPoint opened this issue · comments

what's the difference betwen builder.py and abstruct_factory.py

They are two different ways of creating objects. A builder typically creates a complex object in multiple steps, and until the final build/create function is executed the object is incomplete (in the example builder.py, that's the building object)

@faif Thanks

Maybe you can write a little more like what's the difference btw those pattern, and where and how to utilize it in different scnerio