Ask for forgiveness, not permission. I.e. catch KeyError here, that saves one dict lookup per key.