def _is_external(self, path): path = self.normalize(path) uri, fragment = (path.rsplit('#', maxsplit=1) if '#' in path else (None, path)) return uri, fragment