def _expand_description(desc):
    """Expand the description given the group names/patterns
    e.g:
    {src: grp[1-3], dst: grp[4-6] ...} will generate 9 descriptions
    """
    srcs = expand_groups(desc['src'])
    dsts = expand_groups(desc['dst'])
    descs = []
    for src in srcs:
        for dst in dsts:
            local_desc = desc.copy()
            local_desc['src'] = src
            local_desc['dst'] = dst
            descs.append(local_desc)

    return descs
def _expand_description ( desc ) : srcs = expand_groups ( desc [ 'src' ] ) dsts = expand_groups ( desc [ 'dst' ] ) descs = [ ] for src in srcs : for dst in dsts : local_desc = desc . copy ( ) local_desc [ 'src' ] = src local_desc [ 'dst' ] = dst descs . append ( local_desc ) return descs
Expand the description given the group names/patterns
    e.g:
    {src: grp[1-3], dst: grp[4-6] ...} will generate 9 descriptions