def get_attr(attr, element):
    """
    Like get, but for attributes.

    Complexity: O(1)
    params:
        attr: the attribute to get
        element: the element to search
    returns: the attribute
    """
    return getattr(element, attr)