[Python-Dev] Re: [Patches] [1.6] dictionary objects: new method 'supplement'

Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Mon, 3 Apr 2000 12:25:05 +0200


Greg Stein wrote:
> I don't recall the termination of the discussion, but I don't know =
that
> consensus was ever reached.

iirc, Ping liked it, but I'm not sure anybody else contributed
much to that thread...

(and to neutralize Ping, just let me say that I don't like it :-)

> Personally, I find this of little value over the similar (not exact) =
code:
>=20
> def supplement(dict, extra):
>   d =3D extra.copy()
>   d.update(dict)
>   return d

has anyone benchmarked this?  for some reason, I doubt that the
difference between copy/update and supplement is that large...

> Another view: why keep adding methods to service all possible needs?

exactly.

</F>