From #1078. If the conversion function raises a KeyError, that should be propagated instead of returning the default.
switch = {'a': 1}
data = TypeConversionDict(good='a', bad='b')
out = data.get('good', 'default', lambda v: switch[v])
assert out == 1
out = data.get('bad', 'default', lambda v: switch[v])
assert out != 'default' # shouldn't get here, should propagate KeyError from converter
From #1078. If the conversion function raises a
KeyError, that should be propagated instead of returning the default.