

def __new__(cls, name, _type='REQ', subscription='', context=None):

    def parse(sockfile):
        (folder, name) = osp.split(osp.splitext(sockfile)[0])
        pattern = osp.basename(folder)
        pattern = [item[0] for item in patterns.iteritems() if (item[1] == pattern)][0]
        return (name, pattern)
    socks = glob.glob(('tmp/sockets/%s/%s.sock' % (patterns[_type], name)))
    socks = map((lambda x: parse(cls)), socks)
    socks = [Socket(i[0], i[1], subscription, context) for i in socks]
    return MultiObject(socks)

dataset/ETHPy150Open alexcepoi/pyscale/pyscale/zmq/multisocket.py MultiSocket.__new__/VarMisuse@130/155 `x`->`cls`