def merge(iterables):
    _heappop, _heapreplace, _StopIteration = heappop, heapreplace, StopIteration

    h = []
    h_append = h.append
    for i, it in enumerate(map(iter, iterables)):
        try:
            next = it.next if hasattr(it, 'next') else it.__next__
            h_append([next(), i, next])
        except _StopIteration:
            pass

    heapify(h)

    while 1:
        try:
            while 1:
                v, i, next = s = h[0]       # raises IndexError when h is empty
                s[0] = next()               # raises StopIteration when exhausted
                yield v
                _heapreplace(h, s)          # restore heap condition
        except _StopIteration:
            _heappop(h)                     # remove empty iterator
            yield v
        except IndexError:
            return
Returns True if an object is a number or complex type, otherwise returns False.
dataset/ETHPy150Open bioinformed/vgraph/vgraph/intervals.py/merge--crossover with--dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/util/arguments.py/isScalar