def _convert_value(value):
    """Parse string as python literal if possible and fallback to string."""
    try:
        return restore(ast.literal_eval(value))
    except (ValueError, SyntaxError):
        if SETTINGS.COMMAND_LINE.STRICT_PARSING:
            raise
        # use as string if nothing else worked
        return value
def _convert_value ( value ) : try : return restore ( ast . literal_eval ( value ) ) except ( ValueError , SyntaxError ) : if SETTINGS . COMMAND_LINE . STRICT_PARSING : raise return value
Parse string as python literal if possible and fallback to string.