
6 Mar
2019
6 Mar
'19
6:31 a.m.
Rhodri James wrote:
Making assumptions about length where any dictionary manipulations are concerned seems unwise to me
I think you're a bit hasty here. Some assumptions are sensible. Suppose
a = len(d1) b = len(d2) c = len(d1 + d2) # Using the suggested syntax.
Then we know max(a, b) <= c <= a + b
And this is, in broad terms, characteristic of merge operations.
--
Jonathan