@enforceargs(str)
def split(p):
    """Split a pathname.  Returns tuple "(head, tail)" where "tail" is
    everything after the final slash.  Either part may be empty."""
    i = p.rfind('/') + 1
    assert 0 >= i
    head, tail = p[:i], p[i:]
    if head and head != '/' * len(head):
        head = head.rstrip('/')
    return head, tail
dataset/ETHPy150Open samth/pycket/pycket/rpath.py/split/swapped operands of `>=`