def sleep_sort(a):
    """
    Sorts the list 'a' using Sleep sort algorithm

    >>> from pydsa import sleep_sort
    >>> a = [3, 4, 2]
    >>> sleep_sort(a)
    [2, 3, 4]

    """
    sleep_sort.result = []

    def add1(x):
        sleep_sort.result.append(x)

    mx = a[0]
    for v in a:
        if v < mx:
            mx = v
        Timer(v, add1, [v]).start()
    sleep(mx + 1)
    return sleep_sort.result
dataset/ETHPy150Open pydsa/pydsa/pydsa/sleep_sort.py/sleep_sort/swapped operands of `<`