def update_defaults(defaults):
    config = os.path.expanduser('~/.restcli')
    if os.path.isfile(config):
        for line in open(config):
            key, value = line.split('=', 1)
            key = key.lower().strip()
            key = key.replace('-', '_')
            if key.startswith('header'):
                key = 'headers'
            value = value.strip()
            if key in defaults:
                default = defaults[key]
                if default in (True, False):
                    value = as_bool(value)
                elif isinstance(default, list):
                    default.append(value)
                    value = default
                defaults[key] = value
dataset/ETHPy150Open benoitc/restkit/restkit/contrib/console.py/update_defaults/original