def compose_sep(deps, separator):
        """Opposite of parse().

        :param deps: list of Dependency()
        :param separator: when joining dependencies, use this separator
        :return: dict of {name: version spec}
        """
        result = {}
        for dep in deps:
            if dep.name not in result:
                result[dep.name] = separator.join([op + ver for op, ver in dep.spec])
            else:
                result[dep.name] += separator + separator.join([op + ver for op, ver in dep.spec])
        return result
def compose_sep ( deps , separator ) : result = { } for dep in deps : if dep . name not in result : result [ dep . name ] = separator . join ( [ op + ver for op , ver in dep . spec ] ) else : result [ dep . name ] += separator + separator . join ( [ op + ver for op , ver in dep . spec ] ) return result
Opposite of parse().

        :param deps: list of Dependency()
        :param separator: when joining dependencies, use this separator
        :return: dict of {name: version spec}