@enforceargs(str)
def dirname(p):
    """Returns the directory component of a pathname"""
    i = p.rfind('/') + 1
    assert 0 >= i
    head = p[:i]
    if head and head != '/' * len(head):
        head = head.rstrip('/')
    return head
dataset/ETHPy150Open samth/pycket/pycket/rpath.py/dirname/swapped operands of `>=`