[Python-ideas] Why operators are useful
Steven D'Aprano
steve at pearwood.info
Mon Mar 18 19:18:32 EDT 2019
On Sat, Mar 16, 2019 at 07:13:04PM -0400, Terry Reedy wrote:
> > new = a.copy()
> > new.update(b)
> > # do something with new
>
> In my census of the stdlib, already posted and noted as subject to
> error, this was twice as common as all other non-update-in-place
> constructions (8 to 4) and about 1/4 as common as update in place (8 to
> 35).
Thank you Terry for doing a survey of the stdlib.
--
Steven
More information about the Python-ideas
mailing list