def load(self, loader, pathname, recursive=False, encoding=None):
        """Once add the constructor to PyYAML loader class,
        Loader will use this function to include other YAML fils
        on parsing ``"!include"`` tag

        :param loader: Instance of PyYAML's loader class
        :param str pathname: pathname can be either absolute (like /usr/src/Python-1.5/Makefile) or relative (like ../../Tools/*/*.gif), and can contain shell-style wildcards

        :param bool recursive: If recursive is true, the pattern ``"**"`` will match any files and zero or more directories and subdirectories. If the pattern is followed by an os.sep, only directories and subdirectories match.

            Note:
             Using the ``"**"`` pattern in large directory trees may consume an inordinate amount of time.

        :param str encoding: YAML file encoding

            :default: ``None``: Attribute :attr:`encoding` or constant :attr:`DEFAULT_ENCODING` will be used to open it

        :return: included YAML file, in Python data type

        .. warning:: It's called by :mod:`yaml`. Do NOT call it yourself.
        """
        if not encoding:
            encoding = self._encoding or self.DEFAULT_ENCODING
        if self._base_dir:
            pathname = os.path.join(self._base_dir, pathname)
        if re.match(WILDCARDS_REGEX, pathname):
            result = []
            if PYTHON_MAYOR_MINOR >= '3.5':
                iterator = iglob(pathname, recursive=recursive)
            else:
                iterator = iglob(pathname)
            for path in iterator:
                if os.path.isfile(path):
                    with io.open(path, encoding=encoding) as fp:  # pylint:disable=invalid-name
                        result.append(yaml.load(fp, type(loader)))
            return result
        with io.open(pathname, encoding=encoding) as fp:  # pylint:disable=invalid-name
            return yaml.load(fp, type(loader))
def load ( self , loader , pathname , recursive = False , encoding = None ) : if not encoding : encoding = self . _encoding or self . DEFAULT_ENCODING if self . _base_dir : pathname = os . path . join ( self . _base_dir , pathname ) if re . match ( WILDCARDS_REGEX , pathname ) : result = [ ] if PYTHON_MAYOR_MINOR >= '3.5' : iterator = iglob ( pathname , recursive = recursive ) else : iterator = iglob ( pathname ) for path in iterator : if os . path . isfile ( path ) : with io . open ( path , encoding = encoding ) as fp : result . append ( yaml . load ( fp , type ( loader ) ) ) return result with io . open ( pathname , encoding = encoding ) as fp : return yaml . load ( fp , type ( loader ) )
Once add the constructor to PyYAML loader class,
        Loader will use this function to include other YAML fils
        on parsing ``"!include"`` tag

        :param loader: Instance of PyYAML's loader class
        :param str pathname: pathname can be either absolute (like /usr/src/Python-1.5/Makefile) or relative (like ../../Tools/*/*.gif), and can contain shell-style wildcards

        :param bool recursive: If recursive is true, the pattern ``"**"`` will match any files and zero or more directories and subdirectories. If the pattern is followed by an os.sep, only directories and subdirectories match.

            Note:
             Using the ``"**"`` pattern in large directory trees may consume an inordinate amount of time.

        :param str encoding: YAML file encoding

            :default: ``None``: Attribute :attr:`encoding` or constant :attr:`DEFAULT_ENCODING` will be used to open it

        :return: included YAML file, in Python data type

        .. warning:: It's called by :mod:`yaml`. Do NOT call it yourself.