3 ms·
with an object method you could return the changed dict (ref semantics, much faster) and as class methodcall you would return a copy, as with +. d.merge(d1) vs
by rurban 8y ago
with an object method you could return the changed dict (ref semantics, much faster) and as class methodcall you would return a copy, as with +.
d.merge(d1) vs dict.merge(d, d1)
So have the best of both worlds, and backwards compatible.