def typed_ordered_dict(key_type, value_type, default):
 return (lambda setting: OrderedDict(((key_type(StringConverter(key)), (value_type(StringConverter(value)) if (value != '') else default)) for (key, value) in OrderedDict(setting).items())))

def typed_ordered_dict ( key_type , value_type , default ) : return ( lambda setting : OrderedDict ( ( ( key_type ( StringConverter ( key ) ) , ( value_type ( StringConverter ( value ) ) if ( value != '' ) else default ) ) for ( key , value ) in OrderedDict ( setting ) . items ( ) ) ) )
creates a function that converts a setting into an ordered dict with the given types .