Is there a way to do this for k, v in dict.items(): dict[k] = f(v) without involving a Python for loop? I'd imagine that a function implemented in C could speed things up quite a bit. Something like either of the following mapvalue(f, dict) dict.mapvalue(f) Huaiyu