def setting_value(setting_name, view=None, window=None):

    _require_unicode('setting_name', setting_name)
    _check_view_window(view, window)

    setting, source = _get_most_specific_setting(setting_name, view, window)

    if setting == _NO_VALUE:
        setting = None
        source = None

        shell, env = shellenv.get_env()
        if setting_name in env:
            source = shell
            setting = env[setting_name]

    if setting_name not in set(['GOPATH', 'GOROOT']):
        return (setting, source)

    if setting is None and source is None:
        return (setting, source)

    # We add some extra processing here for known settings to improve the
    # user experience, especially around debugging
    _debug_unicode_string(setting_name, setting, source)

    if not isinstance(setting, str_cls):
        setting = str_cls(setting)

    if setting_name == 'GOROOT':
        if os.path.exists(setting):
            return (setting, source)

    has_multiple = False
    if setting_name == 'GOPATH':
        values = setting.split(os.pathsep)
        has_multiple = len(values) > 1
        missing = []

        for value in values:
            if not os.path.exists(value):
                missing.append(value)

        if not missing:
            return (setting, source)

    if setting_name == 'GOROOT':
        message = 'The GOROOT environment variable value "%s" does not exist on the filesystem'
        e = GoRootNotFoundError(message % setting)
        e.directory = setting
        raise e

    if not has_multiple:
        suffix = 'value "%s" does not exist on the filesystem' % missing[0]
    elif len(missing) == 1:
        suffix = 'contains the directory "%s" that does not exist on the filesystem' % missing[0]
    else:
        paths = ', '.join('"' + path + '"' for path in missing)
        suffix = 'contains %s directories that do not exist on the filesystem: %s' % (len(missing), paths)

    message = 'The GOPATH environment variable ' + suffix
    e = GoPathNotFoundError(message)
    e.directories = missing
    raise e
create a new copy of this :class:`.Context`. with
dataset/ETHPy150Open golang/sublime-config/all/golangconfig.py/setting_value--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Mako-0.8.1/mako/runtime.py/Context._clean_inheritance_tokens