<reponame>CheeseLord/warts<filename>src/shared/utils.py
def minmax(a, b):
    "return (min(a, b), max(a, b))"
    if a <= b:
        return (a, b)
    else:
        return (b, a)

def thisShouldNeverHappen(reason=None):
    if reason is None:
        reason = "This should never happen"
    assert False, reason

def thisIsNotHandled(reason=None):
    if reason is None:
        reason = "This case is not handled"
    assert False, reason


def minmax(a, b):
    "return (min(a, b), max(a, b))"
    if a <= b:
        return (a, b)
    else:
        return (b, a)

def thisShouldNeverHappen(reason=None):
    if reason is None:
        reason = "This should never happen"
    assert False, reason

def thisIsNotHandled(reason=None):
    if reason is None:
        reason = "This case is not handled"
    assert False, reason