[Python-ideas] "Immutable Builder" Pattern and Operator
Random832
random832 at fastmail.com
Mon Jan 23 09:25:48 EST 2017
On Mon, Jan 23, 2017, at 09:12, Soni L. wrote:
> Builders for network connections where you don't wanna start with a
> fresh builder every time.
Maybe you need a builder builder.
Or, more seriously, a way to differentiate the things in the 'builder'
from the things that are going to be different with each connection, and
pass them separately in the connection's constructor.
Or a clone method.
> It is far more useful only because it's not just a syntax sugar. It's
> more like a completely new, standalone operator.
> Which, IMO, makes it more confusing.
>
> I propose `x .= y` -> `x = x . y`, for any `y`.
I think you're underestimating the extent to which the fact that "y"
isn't a real expression will cause confusion.
More information about the Python-ideas
mailing list