def is_proper(str):
    """Tests if a set of parentheses are properly closed.

    >>> is_proper('()(())')  # regular doctests
    True
    >>> is_proper('(()()')  # too many open parens
    False
    >>> is_proper('())')  # too many close parens
    False
    >>> is_proper('())(')  # parens don't match
    False
    """
    try:
        parens = []
        for c in str:
            if c == '(':
                parens.append(c)  # > [1, 2, 3].pop() => 3
            else:
                parens.pop()  # > [1, 2, 3].pop(0) => 3
        return len(parens) == 0
    except IndexError:
        return False