On 23.01.17 00:45, Soni L. wrote:
I've been thinking of an Immutable Builder pattern and an operator to go
with it. Since the builder would be immutable, this wouldn't work:
long_name = mkbuilder()
long_name.seta(a)
long_name.setb(b)
y = long_name.build()
I think the more pythonic way is:
y = build(a=a, b=b)
A Builder pattern is less used in Python due to the support of keyword
arguments.
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/