def get_parser(self, directory, base_python_name):
        """
        Get a parser for the given directory, or create one if
        necessary.  This way parsers can be cached and reused.

        # @@: settings are inherited from the first caller
        """
        try:
            return self.parsers_by_directory[(directory, base_python_name)]
        except __HOLE__:
            parser = self.__class__(
                {},
                directory, base_python_name,
                index_names=self.index_names,
                hide_extensions=self.hide_extensions,
                ignore_extensions=self.ignore_extensions,
                constructors=self.constructors)
            self.parsers_by_directory[(directory, base_python_name)] = parser
            return parser
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/urlparser.py/URLParser.get_parser