'Interpolate the value and parse it with the appropriate type.'

def InterpolateValue(self, value, type_info_obj=type_info.String(), default_section=None, context=None):

    if isinstance(value, basestring):
        try:
            value = StringInterpolator(value, self, default_section=default_section, parameter=type_info_obj.name, context=context).Parse()
        except InterpolationError as e:
            e.AddContext(value)
            raise
        value = type_info_obj.FromString(value)
    if isinstance(value, list):
        value = [self.InterpolateValue(v, default_section=default_section, context=context) for v in value]
    return value
