
March 6, 2019
12:31 p.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