def _path_split(path):
    """
    Split up a URL path into its component elements.  Repeated slashes
    are skipped, and no indication is given if there is a trailing
    slash.  Also, the root element ('/') is not included.

    :param path: The URL path to split.

    :returns: An iterator which iterates over all the elements of the
              path.
    """
    start = None
    slash = True
    for idx, char in enumerate(path):
        if char == '/':
            if not slash:
                yield path[start:idx]
                start = None
                slash = True
        elif start is None:
            start = idx
            slash = False
    if start is not None:
        yield path[start:]
