def _update_defaults(self, defaults):
<EOL>self.values = optparse.Values(self.defaults)<EOL>late_eval = set()<EOL>for key, val in self._get_ordered_configuration_items():<EOL><INDENT>option = self.get_option('<STR_LIT>' + key)<EOL>if option is None:<EOL><INDENT>continue<EOL><DEDENT>if option.action in ('<STR_LIT:store_true>', '<STR_LIT>', '<STR_LIT:count>'):<EOL><INDENT>try:<EOL><INDENT>val = strtobool(val)<EOL><DEDENT>except ValueError:<EOL><INDENT>error_msg = invalid_config_error_message(<EOL>option.action, key, val<EOL>)<EOL>self.error(error_msg)<EOL><DEDENT><DEDENT>elif option.action == '<STR_LIT>':<EOL><INDENT>val = val.split()<EOL>val = [self.check_default(option, key, v) for v in val]<EOL><DEDENT>elif option.action == '<STR_LIT>':<EOL><INDENT>late_eval.add(option.dest)<EOL>opt_str = option.get_opt_string()<EOL>val = option.convert_value(opt_str, val)<EOL>args = option.callback_args or ()<EOL>kwargs = option.callback_kwargs or {}<EOL>option.callback(option, opt_str, val, self, *args, **kwargs)<EOL><DEDENT>else:<EOL><INDENT>val = self.check_default(option, key, val)<EOL><DEDENT>defaults[option.dest] = val<EOL><DEDENT>for key in late_eval:<EOL><INDENT>defaults[key] = getattr(self.values, key)<EOL><DEDENT>self.values = None<EOL>return defaults<EOL>
Updates the given defaults with values from the config files and
        the environ. Does a little special handling for certain types of
        options (lists).